Update app.py
Browse files
app.py
CHANGED
@@ -176,7 +176,8 @@ def visualize_subTaraf(taraf_num, hadith_str, yaxis):
|
|
176 |
else:
|
177 |
#print('Invalid Data format!')
|
178 |
raise gr.Error("Invalid Data format!")
|
179 |
-
|
|
|
180 |
taraf = matn_info[matn_info['taraf_ID'] == taraf_num]
|
181 |
num_hadith = taraf.shape[0]
|
182 |
if np.max(hadiths) > num_hadith:
|
|
|
176 |
else:
|
177 |
#print('Invalid Data format!')
|
178 |
raise gr.Error("Invalid Data format!")
|
179 |
+
|
180 |
+
hadiths= np.unique(hadiths)
|
181 |
taraf = matn_info[matn_info['taraf_ID'] == taraf_num]
|
182 |
num_hadith = taraf.shape[0]
|
183 |
if np.max(hadiths) > num_hadith:
|