640510702phithak commited on
Commit
afd102d
·
verified ·
1 Parent(s): c98c195

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -16,6 +16,10 @@ def get_embedding(text):
16
  embedding = outputs.last_hidden_state.mean(dim=1)
17
  return embedding.squeeze().tolist()
18
 
 
 
 
 
19
  @app.post("/embed")
20
  async def embed_text(data: dict):
21
  text = data.get("text", "")
 
16
  embedding = outputs.last_hidden_state.mean(dim=1)
17
  return embedding.squeeze().tolist()
18
 
19
+ @app.get("/")
20
+ def home():
21
+ return {"message": "Text Embedding API is running!"}
22
+
23
  @app.post("/embed")
24
  async def embed_text(data: dict):
25
  text = data.get("text", "")