Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -401,11 +401,11 @@ def history():
|
|
| 401 |
search_results = perform_search_and_get_results('history', prompt)
|
| 402 |
for result in search_results:
|
| 403 |
history_answers = result.payload['reponse'].splite(',')
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
return jsonify({'result_history': finale_result})
|
| 410 |
else:
|
| 411 |
return jsonify({'error': 'Invalid request'}), 400
|
|
|
|
| 401 |
search_results = perform_search_and_get_results('history', prompt)
|
| 402 |
for result in search_results:
|
| 403 |
history_answers = result.payload['reponse'].splite(',')
|
| 404 |
+
for item in history_answers:
|
| 405 |
+
result = perform_search_and_get_results_histroy_filter('paragraph2', query, item, 3)
|
| 406 |
+
for res in result:
|
| 407 |
+
if res.score > 0.85:
|
| 408 |
+
finale_result.extend(res)
|
| 409 |
return jsonify({'result_history': finale_result})
|
| 410 |
else:
|
| 411 |
return jsonify({'error': 'Invalid request'}), 400
|