akhooli commited on
Commit
7f0e044
1 Parent(s): 8c96dcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- print(f"Sura: {r['document_id']} ({r['document_metadata']}) \n Text:{r['content']}")
 
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