Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def read_root(request: Request):
|
|
15 |
return templates.TemplateResponse("index.html", {"request": request})
|
16 |
|
17 |
@app.post("/embed")
|
18 |
-
def embed_string(query: str)
|
19 |
embedding = model.encode([query])
|
20 |
index.add(np.array(embedding))
|
21 |
return {"message": "String embedded and added to FAISS database"}
|
|
|
15 |
return templates.TemplateResponse("index.html", {"request": request})
|
16 |
|
17 |
@app.post("/embed")
|
18 |
+
def embed_string(query: str):
|
19 |
embedding = model.encode([query])
|
20 |
index.add(np.array(embedding))
|
21 |
return {"message": "String embedded and added to FAISS database"}
|