awacke1 commited on
Commit
91c4af5
ยท
1 Parent(s): 047b770

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -39
app.py CHANGED
@@ -18,32 +18,23 @@ graph.attr(compound="true")
18
  graph.attr(nodesep="0.5")
19
 
20
  # Define the nodes
21
- graph.node("๐Ÿ“Š Data Collection")
22
- graph.node("๐Ÿงน Data Cleaning")
23
- graph.node("๐Ÿ”ง Data Transformation")
24
- graph.node("๐Ÿ”Ž Feature Engineering")
25
- graph.node("โš™๏ธ Model Selection")
26
- graph.node("๐ŸŽ“ Model Training")
27
- graph.node("๐Ÿšข Model Deployment")
28
- graph.node("๐Ÿ“ก Model Serving")
29
- graph.node("๐Ÿ”ฎ Predictions")
30
- graph.node("๐Ÿ‘ Feedback Collection")
31
- graph.node("๐Ÿค” Feedback Processing")
32
- graph.node("โœ๏ธ Model Updating")
 
 
33
 
34
- # Add the edges
35
- graph.edge("๐Ÿ“Š Data Collection", "๐Ÿงน Data Cleaning")
36
- graph.edge("๐Ÿงน Data Cleaning", "๐Ÿ”ง Data Transformation")
37
- graph.edge("๐Ÿ”ง Data Transformation", "๐Ÿ”Ž Feature Engineering")
38
- graph.edge("๐Ÿ”Ž Feature Engineering", "โš™๏ธ Model Selection")
39
- graph.edge("โš™๏ธ Model Selection", "๐ŸŽ“ Model Training")
40
- graph.edge("๐ŸŽ“ Model Training", "๐Ÿšข Model Deployment")
41
- graph.edge("๐Ÿšข Model Deployment", "๐Ÿ“ก Model Serving")
42
- graph.edge("๐Ÿ“ก Model Serving", "๐Ÿ”ฎ Predictions")
43
- graph.edge("๐Ÿ”ฎ Predictions", "๐Ÿ‘ Feedback Collection")
44
- graph.edge("๐Ÿ‘ Feedback Collection", "๐Ÿค” Feedback Processing")
45
- graph.edge("๐Ÿค” Feedback Processing", "โœ๏ธ Model Updating")
46
- graph.edge("โœ๏ธ Model Updating", "๐ŸŽ“ Model Training")
47
 
48
  # Add the swim lanes
49
  with graph.subgraph(name="cluster_0") as c:
@@ -76,19 +67,9 @@ def render_graph():
76
 
77
  def update_graph():
78
  for i in range(10):
79
- # Update the graph with new inputs randomly
80
- graph.node("๐Ÿ“Š Data Collection", label=f"๐Ÿ“Š Data Collection\nData {random.randint(0,100)}")
81
- graph.node("๐Ÿงน Data Cleaning", label=f"๐Ÿงน Data Cleaning\nCleaned Data {random.randint(0,100)}")
82
- graph.node("๐Ÿ”ง Data Transformation", label=f"๐Ÿ”ง Data Transformation\nTransformed Data {random.randint(0,100)}")
83
- graph.node("๐Ÿ”Ž Feature Engineering", label=f"๐Ÿ”Ž Feature Engineering\nFeatures {random.randint(0,100)}")
84
- graph.node("โš™๏ธ Model Selection", label=f"โš™๏ธ Model Selection\nSelected Model {random.randint(0,100)}")
85
- graph.node("๐ŸŽ“ Model Training", label=f"๐ŸŽ“ Model Training\nTrained Model {random.randint(0,100)}")
86
- graph.node("๐Ÿšข Model Deployment", label=f"๐Ÿšข Model Deployment\nDeployed Model {random.randint(0,100)}")
87
- graph.node("๐Ÿ“ก Model Serving", label=f"๐Ÿ“ก Model Serving\nServed Model {random.randint(0,100)}")
88
- graph.node("๐Ÿ”ฎ Predictions", label=f"๐Ÿ”ฎ Predictions\nPredicted Results {random.randint(0,100)}")
89
- graph.node("๐Ÿ‘ Feedback Collection", label=f"๐Ÿ‘ Feedback Collection\nFeedback {random.randint(0,100)}")
90
- graph.node("๐Ÿค” Feedback Processing", label=f"๐Ÿค” Feedback Processing\nProcessed Feedback {random.randint(0,100)}")
91
- graph.node("โœ๏ธ Model Updating", label=f"โœ๏ธ Model Updating\nUpdated Model {random.randint(0,100)}")
92
 
93
  # Render the updated graph
94
  render_graph()
@@ -100,4 +81,4 @@ def update_graph():
100
  render_graph()
101
 
102
  # Update the graph every second for 60 seconds
103
- update_graph()
 
18
  graph.attr(nodesep="0.5")
19
 
20
  # Define the nodes
21
+ nodes = [
22
+ "๐Ÿ“Š Data Collection",
23
+ "๐Ÿงน Data Cleaning",
24
+ "๐Ÿ”ง Data Transformation",
25
+ "๐Ÿ”Ž Feature Engineering",
26
+ "โš™๏ธ Model Selection",
27
+ "๐ŸŽ“ Model Training",
28
+ "๐Ÿšข Model Deployment",
29
+ "๐Ÿ“ก Model Serving",
30
+ "๐Ÿ”ฎ Predictions",
31
+ "๐Ÿ‘ Feedback Collection",
32
+ "๐Ÿค” Feedback Processing",
33
+ "โœ๏ธ Model Updating"
34
+ ]
35
 
36
+ for node in nodes:
37
+ graph.node(node)
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  # Add the swim lanes
40
  with graph.subgraph(name="cluster_0") as c:
 
67
 
68
  def update_graph():
69
  for i in range(10):
70
+ # Randomly select two nodes and add an edge between them
71
+ node1, node2 = random.sample(nodes, 2)
72
+ graph.edge(node1, node2)
 
 
 
 
 
 
 
 
 
 
73
 
74
  # Render the updated graph
75
  render_graph()
 
81
  render_graph()
82
 
83
  # Update the graph every second for 60 seconds
84
+ update_graph()