Update app.py
Browse files
app.py
CHANGED
@@ -368,7 +368,7 @@ def visualize_narrator_taraf(taraf_num, narrator, yaxis):
|
|
368 |
else:
|
369 |
net.add_node(node, font = {'size':30, 'color': 'red'}, color = value_to_hex(student_narrations), label = f'{node_name} \n {student_rank} \n ID: {node} - Gen {student_gen}', x= pos[0]*x_stretch, y= -1*pos[1]*y_stretch, size= 50)
|
370 |
for edge in G.edges:
|
371 |
-
row = isnad_hadith[(isnad_hadith['Source'] == edge[0]) & (isnad_hadith['Destination'] == edge[1])]
|
372 |
source = row['Source']
|
373 |
target = row['Destination']
|
374 |
net.add_edge(source, target, color = value_to_hex(int(row[f'{yaxis} Count'])), label = f"{row[f'{yaxis} Count']}")
|
|
|
368 |
else:
|
369 |
net.add_node(node, font = {'size':30, 'color': 'red'}, color = value_to_hex(student_narrations), label = f'{node_name} \n {student_rank} \n ID: {node} - Gen {student_gen}', x= pos[0]*x_stretch, y= -1*pos[1]*y_stretch, size= 50)
|
370 |
for edge in G.edges:
|
371 |
+
row = isnad_hadith[(isnad_hadith['Source'] == edge[0]) & (isnad_hadith['Destination'] == edge[1])].iloc[0]
|
372 |
source = row['Source']
|
373 |
target = row['Destination']
|
374 |
net.add_edge(source, target, color = value_to_hex(int(row[f'{yaxis} Count'])), label = f"{row[f'{yaxis} Count']}")
|