Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,9 +46,9 @@ collection.add(
|
|
46 |
def search_chroma(query:str):
|
47 |
results = collection.query(
|
48 |
query_embeddings=embedding_function([query]),
|
49 |
-
n_results=
|
50 |
)
|
51 |
-
text_only= [f"# Dish:\n{item}\n\n" for item in results['documents']]
|
52 |
return "".join(text_only)
|
53 |
|
54 |
def reranking_results(query: str, top_k_results: list[str]):
|
|
|
46 |
def search_chroma(query:str):
|
47 |
results = collection.query(
|
48 |
query_embeddings=embedding_function([query]),
|
49 |
+
n_results=2
|
50 |
)
|
51 |
+
text_only= [f"# Dish:\n{item}\n\n" for item in results['documents'][0]]
|
52 |
return "".join(text_only)
|
53 |
|
54 |
def reranking_results(query: str, top_k_results: list[str]):
|