Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -49,9 +49,9 @@ def embed_single_text(text: str) -> Tensor:
|
|
49 |
@app.get("/e5_embeddings")
|
50 |
def e5_embeddings(query: str = Query(...)):
|
51 |
|
52 |
-
result = embed_single_text(query)
|
53 |
|
54 |
-
if result:
|
55 |
-
return
|
56 |
else:
|
57 |
raise HTTPException(status_code=500)
|
|
|
49 |
@app.get("/e5_embeddings")
|
50 |
def e5_embeddings(query: str = Query(...)):
|
51 |
|
52 |
+
result = embed_single_text([query])
|
53 |
|
54 |
+
if result is not None:
|
55 |
+
return result.tolist()
|
56 |
else:
|
57 |
raise HTTPException(status_code=500)
|