FDSRashid commited on
Commit
f21664b
·
verified ·
1 Parent(s): 5a0edae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -81,11 +81,12 @@ def network_narrator(narrator_id, fst_year, lst_year, yaxis):
81
  merge_edge_group = merge_edge.groupby('Edge_Name').sum().reset_index()[['Taraf', 'Hadith', 'Isnad', 'Edge_Name']]
82
  merge_group_formatted = splitIsnad(merge_edge_group).drop(['Edge_Name'], axis=1)
83
 
 
84
  return f"""<iframe style="width: 100%; height: 600px;margin:0 auto" name="result" allow="midi; geolocation; microphone; camera;
85
  display-capture; encrypted-media;" sandbox="allow-modals allow-forms
86
  allow-scripts allow-same-origin allow-popups
87
  allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
88
- allowpaymentrequest="" frameborder="0" srcdoc='{html}'></iframe>""", edges_prepped[['Teacher', 'Student', 'Tarafs', 'Hadiths', 'Isnads', 'Books']], merge_group_formatted
89
 
90
  def narrator_retriever(name):
91
  return narrator_bios[(narrator_bios['Official Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name))) | (narrator_bios['Famous Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name))) | (narrator_bios['Rawi ID'].astype(str) == name)][['Rawi ID', 'Title Name', 'Official Name', 'Famous Name', 'Number of Narrations', 'Narrator Rank', 'Generation' ]]
 
81
  merge_edge_group = merge_edge.groupby('Edge_Name').sum().reset_index()[['Taraf', 'Hadith', 'Isnad', 'Edge_Name']]
82
  merge_group_formatted = splitIsnad(merge_edge_group).drop(['Edge_Name'], axis=1)
83
 
84
+ edge_full = splitIsnad(edge_narrator[['Tarafs', 'Hadiths', 'Isnads', 'Edge_Name', 'Books']]).drop(['Edge_Name'], axis=1)
85
  return f"""<iframe style="width: 100%; height: 600px;margin:0 auto" name="result" allow="midi; geolocation; microphone; camera;
86
  display-capture; encrypted-media;" sandbox="allow-modals allow-forms
87
  allow-scripts allow-same-origin allow-popups
88
  allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
89
+ allowpaymentrequest="" frameborder="0" srcdoc='{html}'></iframe>""", edge_full, merge_group_formatted
90
 
91
  def narrator_retriever(name):
92
  return narrator_bios[(narrator_bios['Official Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name))) | (narrator_bios['Famous Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name))) | (narrator_bios['Rawi ID'].astype(str) == name)][['Rawi ID', 'Title Name', 'Official Name', 'Famous Name', 'Number of Narrations', 'Narrator Rank', 'Generation' ]]