shukdevdatta123 commited on
Commit
13911ed
·
verified ·
1 Parent(s): 38f979d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -2,6 +2,9 @@ import streamlit as st
2
  import matplotlib.pyplot as plt
3
  import networkx as nx
4
 
 
 
 
5
  # Create lollipop graph
6
  G = nx.lollipop_graph(4, 6)
7
 
@@ -32,8 +35,8 @@ st.write("### Length #paths")
32
  for d in sorted(dist.keys()):
33
  st.write(f"Length {d}: {dist[d]} paths")
34
 
35
- # Display the graph metrics
36
- st.write(f"### Graph Metrics")
37
  st.write(f"Radius: {nx.radius(G)}")
38
  st.write(f"Diameter: {nx.diameter(G)}")
39
  st.write(f"Eccentricity: {nx.eccentricity(G)}")
 
2
  import matplotlib.pyplot as plt
3
  import networkx as nx
4
 
5
+ # Add a headline
6
+ st.title("Basic: Properties")
7
+
8
  # Create lollipop graph
9
  G = nx.lollipop_graph(4, 6)
10
 
 
35
  for d in sorted(dist.keys()):
36
  st.write(f"Length {d}: {dist[d]} paths")
37
 
38
+ # Display the graph metrics with a "Properties" heading
39
+ st.write("### Properties")
40
  st.write(f"Radius: {nx.radius(G)}")
41
  st.write(f"Diameter: {nx.diameter(G)}")
42
  st.write(f"Eccentricity: {nx.eccentricity(G)}")