Spaces:
Runtime error
Runtime error
Commit
·
2c4f22d
1
Parent(s):
98d627f
Update main.py
Browse files
main.py
CHANGED
@@ -64,6 +64,7 @@ def perform_search_and_get_results(collection_name, query, limit=30):
|
|
64 |
"section_text": result.payload["section"],
|
65 |
"section_label": result.payload["section_label"],
|
66 |
"source": result.payload["source"],
|
|
|
67 |
"collection": collection_name,
|
68 |
"hyperlink": ast.literal_eval(result.payload['hyperlink']),
|
69 |
}
|
@@ -87,6 +88,7 @@ def perform_search_and_get_results_with_filter(collection_name, query,reference_
|
|
87 |
"section_text": result.payload["section"],
|
88 |
"section_label": result.payload["section_label"],
|
89 |
"source": result.payload["source"],
|
|
|
90 |
"collection": collection_name,
|
91 |
"hyperlink": ast.literal_eval(result.payload['hyperlink']),
|
92 |
}
|
@@ -271,7 +273,7 @@ def chat_grouped():
|
|
271 |
results.extend(search_results)
|
272 |
grouped_hits = {}
|
273 |
for i, hit in enumerate(results, 1):
|
274 |
-
second_number = hit
|
275 |
if second_number not in grouped_hits:
|
276 |
grouped_hits[second_number] = []
|
277 |
grouped_hits[second_number].append(hit)
|
|
|
64 |
"section_text": result.payload["section"],
|
65 |
"section_label": result.payload["section_label"],
|
66 |
"source": result.payload["source"],
|
67 |
+
"numero_article": result.payload["numero_article"],
|
68 |
"collection": collection_name,
|
69 |
"hyperlink": ast.literal_eval(result.payload['hyperlink']),
|
70 |
}
|
|
|
88 |
"section_text": result.payload["section"],
|
89 |
"section_label": result.payload["section_label"],
|
90 |
"source": result.payload["source"],
|
91 |
+
"numero_article": result.payload["numero_article"],
|
92 |
"collection": collection_name,
|
93 |
"hyperlink": ast.literal_eval(result.payload['hyperlink']),
|
94 |
}
|
|
|
273 |
results.extend(search_results)
|
274 |
grouped_hits = {}
|
275 |
for i, hit in enumerate(results, 1):
|
276 |
+
second_number = hit['numero_article']
|
277 |
if second_number not in grouped_hits:
|
278 |
grouped_hits[second_number] = []
|
279 |
grouped_hits[second_number].append(hit)
|