Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -298,7 +298,8 @@ app = FastAPI()
|
|
298 |
@app.get("/get_data")
|
299 |
def get_data(query: str):
|
300 |
# query = "How much money did the robbers steal?"
|
301 |
-
found_docs = [x.model_dump() for x in qdrant.similarity_search(query)]
|
|
|
302 |
|
303 |
for doc in found_docs:
|
304 |
doc.pop("id", None)
|
|
|
298 |
@app.get("/get_data")
|
299 |
def get_data(query: str):
|
300 |
# query = "How much money did the robbers steal?"
|
301 |
+
# found_docs = [x.model_dump() for x in qdrant.similarity_search(query)]
|
302 |
+
found_docs = [x.model_dump() for x in qdrant.similarity_search_with_score(query, k=10, score_threshold=0.45)]
|
303 |
|
304 |
for doc in found_docs:
|
305 |
doc.pop("id", None)
|