Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,8 +13,10 @@ if os.path.exists(path_to_index):
|
|
| 13 |
import gradio as gr
|
| 14 |
|
| 15 |
def process_results(results):
|
|
|
|
| 16 |
for r in results:
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
k = 3 # How many documents you want to retrieve
|
| 20 |
|
|
|
|
| 13 |
import gradio as gr
|
| 14 |
|
| 15 |
def process_results(results):
|
| 16 |
+
answer = ""
|
| 17 |
for r in results:
|
| 18 |
+
answer += f"Sura: {r['document_id']} ({r['document_metadata']}) \n Text:{r['content']}\n\n"
|
| 19 |
+
return answer
|
| 20 |
|
| 21 |
k = 3 # How many documents you want to retrieve
|
| 22 |
|