FDSRashid commited on
Commit
488e2a0
·
1 Parent(s): 8d42c3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -52,9 +52,9 @@ def network_visualizer(city, year, num_nodes):
52
  edge_color = value_to_hex(attribute_value)
53
  hadith_count = teacher_hadiths[teacher_hadiths['Teacher'] == source]['Hadiths'].to_list()[0]
54
  edge_color = value_to_hex(attribute_value)
55
- net.add_edge(source, target, color=edge_color, value=attribute_value)
56
- net.add_node(source, color=value_to_hex(hadith_count), font = {'size':30, 'color': 'orange'}, label = f"Hadiths: {hadith_count}")
57
- net.add_node(target, color=value_to_hex(attribute_value) , font = {'size': 20, 'color': 'red'}, label = f"Hadith from Teacher: {attribute_value}")
58
  net.add_edge(source, target, color=edge_color, value=attribute_value)
59
 
60
 
 
52
  edge_color = value_to_hex(attribute_value)
53
  hadith_count = teacher_hadiths[teacher_hadiths['Teacher'] == source]['Hadiths'].to_list()[0]
54
  edge_color = value_to_hex(attribute_value)
55
+
56
+ net.add_node(source, color=value_to_hex(hadith_count), font = {'size':30, 'color': 'orange'}, label = f"{source}\nHadiths: {attribute_value}")
57
+ net.add_node(target, color=value_to_hex(attribute_value) , font = {'size': 20, 'color': 'red'}, label = f"{target}\nHadiths: {attribute_value}")
58
  net.add_edge(source, target, color=edge_color, value=attribute_value)
59
 
60