Spaces:
No application file
No application file
from langchain_huggingface.embeddings import HuggingFaceEmbeddings | |
from fastapi import FastAPI | |
from typing import Union | |
app = FastAPI() | |
def read_root(): | |
return {"Hello": "World"} | |
def read_item(): | |
embeddings = HuggingFaceEmbeddings() | |
return embeddings | |
def read_item(text): | |
embeddings = HuggingFaceEmbeddings() | |
return embeddings.embed_query(text) |