Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -104,8 +104,8 @@ def visualize_isnad(taraf_num, yaxis):
|
|
104 |
if row['Source'] == '99999':
|
105 |
net.add_node(source, font = {'size':50, 'color': 'Black'}, color = '#000000')
|
106 |
else:
|
107 |
-
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]} \n ID: {row[
|
108 |
-
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[
|
109 |
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]}")
|
110 |
net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
|
111 |
html = net.generate_html()
|
@@ -144,8 +144,8 @@ def visualize_subTaraf(df, yaxis):
|
|
144 |
if row['Source'] == '99999':
|
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]} \n ID: {row[
|
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]} \n ID: {row[
|
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()
|
|
|
104 |
if row['Source'] == '99999':
|
105 |
net.add_node(source, font = {'size':50, 'color': 'Black'}, color = '#000000')
|
106 |
else:
|
107 |
+
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]} \n ID: {row["Source"]}')
|
108 |
+
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"]}')
|
109 |
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]}")
|
110 |
net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
|
111 |
html = net.generate_html()
|
|
|
144 |
if row['Source'] == '99999':
|
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]} \n ID: {row["Source"]}')
|
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]} \n ID: {row["Destination"]}')
|
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()
|