Spaces:
Build error
Build error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|