FDSRashid commited on
Commit
84acc5f
·
verified ·
1 Parent(s): ecfd1f4

progress made on sub taraf visualization

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -84,6 +84,13 @@ def visualize_subTaraf(taraf_num, hadith_str, yaxis):
84
  else:
85
  #print('Invalid Data format!')
86
  raise gr.Error("Invalid Data format!")
 
 
 
 
 
 
 
87
  return hadiths
88
 
89
 
 
84
  else:
85
  #print('Invalid Data format!')
86
  raise gr.Error("Invalid Data format!")
87
+
88
+ taraf = matn_info[matn_info['taraf_ID'] == taraf_num]
89
+ num_hadith = taraf.shape[0]
90
+ taraf['Index'] = np.arange(num_hadith)
91
+ sub_taraf = taraf[taraf['Index'].isin(hadiths)]
92
+ hadith_cleaned = isnad_info['Tarafs Cleaned'].apply(lambda x: taraf_num in x)
93
+ isnad_hadith = isnad_info[hadith_cleaned]
94
  return hadiths
95
 
96