Update app.py
Browse files
app.py
CHANGED
@@ -124,7 +124,7 @@ def visualize_isnad(taraf_num, yaxis):
|
|
124 |
else:
|
125 |
net.add_node(source, font = {'size':30, 'color': 'red'}, color = value_to_hex(teacher_narrations), label = f'{row["Teacher"]} \n {teacher_info["Narrator Rank"].to_list()[0]} \n ID: {row["Source"]} - Gen {teacher_gen}')
|
126 |
net.add_node(target, font = {'size': 30, 'color': 'red'}, color = value_to_hex(student_narrations), label = f'{target} \n{student_info["Narrator Rank"].to_list()[0]} \n ID: {row["Destination"]} - Gen {student_gen}')
|
127 |
-
net.add_edge(source, target, color = value_to_hex(int(row[f'{yaxis} Count']
|
128 |
net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
|
129 |
html = net.generate_html()
|
130 |
html = html.replace("'", "\"")
|
|
|
124 |
else:
|
125 |
net.add_node(source, font = {'size':30, 'color': 'red'}, color = value_to_hex(teacher_narrations), label = f'{row["Teacher"]} \n {teacher_info["Narrator Rank"].to_list()[0]} \n ID: {row["Source"]} - Gen {teacher_gen}')
|
126 |
net.add_node(target, font = {'size': 30, 'color': 'red'}, color = value_to_hex(student_narrations), label = f'{target} \n{student_info["Narrator Rank"].to_list()[0]} \n ID: {row["Destination"]} - Gen {student_gen}')
|
127 |
+
net.add_edge(source, target, color = value_to_hex(int(row[f'{yaxis} Count'])), label = f"{row[f'{yaxis} Count']}")
|
128 |
net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
|
129 |
html = net.generate_html()
|
130 |
html = html.replace("'", "\"")
|