FDSRashid commited on
Commit
209765b
·
verified ·
1 Parent(s): f4fde07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -333,13 +333,13 @@ def visualize_narrator_taraf(taraf_num, narrator, yaxis):
333
  isnad_in_hadith1 = isnad_hadith['Hadiths Cleaned'].apply(lambda x: taraf_hadith_split[i] in x )
334
  isnad_hadith1 = isnad_hadith[isnad_in_hadith1]
335
  G1 = nx.from_pandas_edgelist(isnad_hadith1, source = 'Source', target = 'Destination', create_using = nx.DiGraph())
336
- node = [int(n) for n, d in G.out_degree() if d == 0]
337
  if narrator in list(G1.nodes):
338
  matns_with_narrator.append(taraf_hadith[i])
339
  for n in node:
340
  if n not in list(end_node.keys()):
341
- end_node[str(n)] = []
342
- end_node[str(n)].append(i)
343
 
344
 
345
 
 
333
  isnad_in_hadith1 = isnad_hadith['Hadiths Cleaned'].apply(lambda x: taraf_hadith_split[i] in x )
334
  isnad_hadith1 = isnad_hadith[isnad_in_hadith1]
335
  G1 = nx.from_pandas_edgelist(isnad_hadith1, source = 'Source', target = 'Destination', create_using = nx.DiGraph())
336
+ node = [n for n, d in G.out_degree() if d == 0]
337
  if narrator in list(G1.nodes):
338
  matns_with_narrator.append(taraf_hadith[i])
339
  for n in node:
340
  if n not in list(end_node.keys()):
341
+ end_node[n] = []
342
+ end_node[n].append(i)
343
 
344
 
345