Spaces:
Sleeping
Sleeping
Update get_hadiths.py
Browse files- get_hadiths.py +1 -1
get_hadiths.py
CHANGED
@@ -61,8 +61,8 @@ class HadithSearch:
|
|
61 |
return formatted_results
|
62 |
|
63 |
def _format_results(self, results):
|
|
|
64 |
for result in results:
|
65 |
-
formatted_output = ""
|
66 |
formatted_output += "### Source: " + str(result["source"]) + " | Chapter name : "+ str(result["chapter"]) +" | Chapter number: " + str(result["chapter_no"]) + " | Hadith number : " + str(result["chapter_no"]) + "\n\n"
|
67 |
formatted_output += "Similarity with query: " + str(round(result["similarities"]*100,2)) + "%" +" | Chain index: " + str(result["chain_indx"]) + "\n\n"
|
68 |
formatted_output += "### Hadith content:" + "\n\n" + str(result["text_en"]) + "\n\n"
|
|
|
61 |
return formatted_results
|
62 |
|
63 |
def _format_results(self, results):
|
64 |
+
formatted_output = ""
|
65 |
for result in results:
|
|
|
66 |
formatted_output += "### Source: " + str(result["source"]) + " | Chapter name : "+ str(result["chapter"]) +" | Chapter number: " + str(result["chapter_no"]) + " | Hadith number : " + str(result["chapter_no"]) + "\n\n"
|
67 |
formatted_output += "Similarity with query: " + str(round(result["similarities"]*100,2)) + "%" +" | Chain index: " + str(result["chain_indx"]) + "\n\n"
|
68 |
formatted_output += "### Hadith content:" + "\n\n" + str(result["text_en"]) + "\n\n"
|