akhooli commited on
Commit
bd604ec
·
verified ·
1 Parent(s): 6d42934

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -7,8 +7,9 @@ path_to_index = 'colbert/indexes/akhooli/Arabic-ColBERT-100knew_index'
7
  message = "waiting to load index ..."
8
  if os.path.exists(path_to_index):
9
  RAG = RAGPretrainedModel.from_index(path_to_index)
10
- print('RAG loaded from index')
11
  message = "index loaded!"
 
 
12
  import gradio as gr
13
 
14
  def process_results(results):
@@ -21,6 +22,6 @@ def answer_fn(query):
21
  results = RAG.search(query= query)
22
  return process_results(results)
23
 
24
- qapp = gr.Interface(fn=check_fn, inputs="textbox", outputs="textbox")
25
  if __name__ == "__main__":
26
  qapp.launch()
 
7
  message = "waiting to load index ..."
8
  if os.path.exists(path_to_index):
9
  RAG = RAGPretrainedModel.from_index(path_to_index)
 
10
  message = "index loaded!"
11
+ print(message)
12
+
13
  import gradio as gr
14
 
15
  def process_results(results):
 
22
  results = RAG.search(query= query)
23
  return process_results(results)
24
 
25
+ qapp = gr.Interface(fn=answer_fn, inputs="textbox", outputs="textbox")
26
  if __name__ == "__main__":
27
  qapp.launch()