TiberiuCristianLeon commited on
Commit
9797698
·
verified ·
1 Parent(s): 00f827d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -115,9 +115,9 @@ def bergamot(input_text: list[str] = Query(description="Input list of strings"),
115
  @app.get("/embed", operation_id="get_embeddings", description="Embed text", tags=["embed"], summary="Embed text")
116
  def embed(text: str, model: str = EMBEDDING_MODELS[0]):
117
  model = SentenceTransformer(model)
118
- embeddings = model.encode(text).tolist()
119
  print(embeddings.shape)
120
- return {"input": text, "embeddings": embeddings, "shape": embeddings.shape}
121
 
122
  # Create an MCP server based on this app
123
  mcp = FastApiMCP(
 
115
  @app.get("/embed", operation_id="get_embeddings", description="Embed text", tags=["embed"], summary="Embed text")
116
  def embed(text: str, model: str = EMBEDDING_MODELS[0]):
117
  model = SentenceTransformer(model)
118
+ embeddings = model.encode(text)
119
  print(embeddings.shape)
120
+ return {"input": text, "embeddings": embeddings.tolist(), "shape": embeddings.shape}
121
 
122
  # Create an MCP server based on this app
123
  mcp = FastApiMCP(