Bofandra commited on
Commit
b5392ae
1 Parent(s): f88d70b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -26,8 +26,14 @@ def find(query):
26
  quran = pd.read_csv('quran-simple-clean.txt', delimiter="|")
27
  quran['similarity'] = text_similarity
28
  sorted_quran = quran.sort_values(by='similarity', ascending=False)
29
-
30
- return sorted_quran.iloc[0]['text']+" (Q.S "+str(sorted_quran.iloc[0]['sura'])+":"+str(sorted_quran.iloc[0]['aya'])+")"
 
 
 
 
 
 
31
 
32
  demo = gr.Interface(fn=find, inputs="textbox", outputs="textbox")
33
 
 
26
  quran = pd.read_csv('quran-simple-clean.txt', delimiter="|")
27
  quran['similarity'] = text_similarity
28
  sorted_quran = quran.sort_values(by='similarity', ascending=False)
29
+
30
+ results = ""
31
+ i = 0
32
+ while i<6:
33
+ results = results + sorted_quran.iloc[i]['text']+" (Q.S "+str(sorted_quran.iloc[i]['sura'])+":"+str(sorted_quran.iloc[i]['aya'])+")\n"
34
+ i=i+1
35
+
36
+ return results
37
 
38
  demo = gr.Interface(fn=find, inputs="textbox", outputs="textbox")
39