Bofandra commited on
Commit
c9b1232
·
verified ·
1 Parent(s): f33586f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -47,10 +47,12 @@ def find(query):
47
  result_quran = quran.loc[(quran['sura']==result['sura']) & (quran['aya']==result['aya'])]
48
  results = results + result_quran['text'].item()+" (Q.S "+str(result['sura']).rstrip('.0')+":"+str(result['aya']).rstrip('.0')+")\n"
49
  i=i+1
50
-
51
- return results
52
 
53
- demo = gr.Interface(fn=find, inputs="textbox", outputs="textbox")
 
 
 
 
54
 
55
  if __name__ == "__main__":
56
  demo.launch()
 
47
  result_quran = quran.loc[(quran['sura']==result['sura']) & (quran['aya']==result['aya'])]
48
  results = results + result_quran['text'].item()+" (Q.S "+str(result['sura']).rstrip('.0')+":"+str(result['aya']).rstrip('.0')+")\n"
49
  i=i+1
 
 
50
 
51
+ return sorted_quran
52
+ #return results
53
+
54
+ demo = gr.Interface(fn=find, inputs="textbox", outputs=gr.Dataframe(headers=['sura', 'aya', 'text', 'similarity']))
55
+ #demo = gr.Interface(fn=find, inputs="textbox", outputs="textbox")
56
 
57
  if __name__ == "__main__":
58
  demo.launch()