Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -145,8 +145,8 @@ def visualize_subTaraf(df):
|
|
145 |
net.add_node(source, font = {'size':50, 'color': 'Black'}, color = '#000000')
|
146 |
else:
|
147 |
net.add_node(source, font = {'size':30, 'color': 'red'}, color = value_to_hex(teacher_narrations), label = f'{source} \n {teacher_info["Narrator Rank"].to_list()[0]}')
|
148 |
-
|
149 |
-
|
150 |
net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
|
151 |
html = net.generate_html()
|
152 |
html = html.replace("'", "\"")
|
|
|
145 |
net.add_node(source, font = {'size':50, 'color': 'Black'}, color = '#000000')
|
146 |
else:
|
147 |
net.add_node(source, font = {'size':30, 'color': 'red'}, color = value_to_hex(teacher_narrations), label = f'{source} \n {teacher_info["Narrator Rank"].to_list()[0]}')
|
148 |
+
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]}')
|
149 |
+
net.add_edge(source, target, color = value_to_hex(int(isnad[f'{yaxis} Count'].to_list()[0])), label = f"{isnad[f'{yaxis} Count'].to_list()[0]}")
|
150 |
net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
|
151 |
html = net.generate_html()
|
152 |
html = html.replace("'", "\"")
|