Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ def get_docs(input_query, country = [], vulnerability_cat = []):
|
|
96 |
filters = {'vulnerability_cat': {'$in': vulnerability_cat}}
|
97 |
else:
|
98 |
filters = {'country': {'$in': country},'vulnerability_cat': {'$in': vulnerability_cat}}
|
99 |
-
docs = retriever.retrieve(query=
|
100 |
# Break out the key fields and convert to pandas for filtering
|
101 |
docs = [{**x.meta,"score":x.score,"content":x.content} for x in docs]
|
102 |
df_docs = pd.DataFrame(docs)
|
|
|
96 |
filters = {'vulnerability_cat': {'$in': vulnerability_cat}}
|
97 |
else:
|
98 |
filters = {'country': {'$in': country},'vulnerability_cat': {'$in': vulnerability_cat}}
|
99 |
+
docs = retriever.retrieve(query=input_query, filters = filters, top_k = 10)
|
100 |
# Break out the key fields and convert to pandas for filtering
|
101 |
docs = [{**x.meta,"score":x.score,"content":x.content} for x in docs]
|
102 |
df_docs = pd.DataFrame(docs)
|