E-slam commited on
Commit
b8a7810
·
verified ·
1 Parent(s): ded6a94

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
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 json.loads(result)
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)