FDSRashid commited on
Commit
30b34eb
·
verified ·
1 Parent(s): 5cca2ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -344,7 +344,8 @@ def visualize_narrator_taraf(taraf_num, narrator, yaxis):
344
  end_node[n] = []
345
  end_node[n].append(str(i))
346
 
347
- hadith_cleaned = isnad_hadith['Hadiths Cleaned'].apply(lambda x: any(i in x for i in matns_with_narrator))
 
348
  isnad_hadith = isnad_hadith[hadith_cleaned]
349
  G = nx.from_pandas_edgelist(isnad_hadith, source = 'Source', target = 'Destination', create_using = nx.DiGraph())
350
  isnad_pos = nx.nx_agraph.graphviz_layout(G, prog='dot')
 
344
  end_node[n] = []
345
  end_node[n].append(str(i))
346
 
347
+ matns_with_narrator_split = [i.split('_') for i in matns_with_narrator]
348
+ hadith_cleaned = isnad_hadith['Hadiths Cleaned'].apply(lambda x: any(i in x for i in matns_with_narrator_split))
349
  isnad_hadith = isnad_hadith[hadith_cleaned]
350
  G = nx.from_pandas_edgelist(isnad_hadith, source = 'Source', target = 'Destination', create_using = nx.DiGraph())
351
  isnad_pos = nx.nx_agraph.graphviz_layout(G, prog='dot')