hacpdsae2023 commited on
Commit
fb9de81
·
1 Parent(s): e864042

Add seed to the graph generator

Browse files

Gragh changed every time it was clicked, add seed to fix G

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ from streamlit_agraph import agraph, Node, Edge, Config
29
  # First create a graph using the Barabasi-Albert model
30
  n = 2000
31
  m = 2
32
- G = nx.generators.barabasi_albert_graph(n, m)
33
 
34
  # Then find the node with the largest degree;
35
  # This node's egonet will be the focus of this example.
 
29
  # First create a graph using the Barabasi-Albert model
30
  n = 2000
31
  m = 2
32
+ G = nx.generators.barabasi_albert_graph(n, m, seed=2023)
33
 
34
  # Then find the node with the largest degree;
35
  # This node's egonet will be the focus of this example.