Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -18,32 +18,23 @@ graph.attr(compound="true")
|
|
18 |
graph.attr(nodesep="0.5")
|
19 |
|
20 |
# Define the nodes
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
33 |
|
34 |
-
|
35 |
-
graph.
|
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 |
-
#
|
80 |
-
|
81 |
-
graph.
|
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()
|