Spaces:
Sleeping
Sleeping
Sathwikchowdary
commited on
Update pages/Life_cycle_of_ML.py
Browse files- pages/Life_cycle_of_ML.py +77 -44
pages/Life_cycle_of_ML.py
CHANGED
@@ -1,58 +1,91 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
<
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</svg>
|
42 |
"""
|
43 |
-
|
44 |
-
|
45 |
-
# Render the SVG
|
46 |
st.markdown(html_content, unsafe_allow_html=True)
|
47 |
-
|
48 |
-
|
|
|
|
|
49 |
if st.button("Problem Statement"):
|
|
|
50 |
if st.button("Data Collection"):
|
|
|
51 |
if st.button("Simple EDA"):
|
|
|
52 |
if st.button("Data Preprocessing"):
|
|
|
53 |
if st.button("EDA"):
|
|
|
54 |
if st.button("Feature Engineering"):
|
|
|
55 |
if st.button("Training"):
|
|
|
56 |
if st.button("Testing"):
|
|
|
57 |
if st.button("Deploying"):
|
|
|
58 |
if st.button("Monitoring"):
|
|
|
|
1 |
+
import streamlit as st
|
2 |
|
3 |
+
# HTML content for the ML life cycle diagram
|
4 |
+
html_content = """
|
5 |
+
<h2 style="text-align: center;">Life Cycle of Machine Learning</h2>
|
6 |
+
|
7 |
+
<svg width="800" height="650">
|
8 |
+
<!-- Problem Statement -->
|
9 |
+
<rect x="50" y="50" width="200" height="50" fill="#FFB6C1" stroke="#000" />
|
10 |
+
<text x="150" y="80" fill="#000" font-size="14" text-anchor="middle">Problem Statement</text>
|
11 |
+
|
12 |
+
<!-- Data Collection -->
|
13 |
+
<circle cx="400" cy="75" r="50" fill="#ADD8E6" stroke="#000" />
|
14 |
+
<text x="400" y="80" fill="#000" font-size="14" text-anchor="middle">Data Collection</text>
|
15 |
+
|
16 |
+
<!-- Simple EDA -->
|
17 |
+
<ellipse cx="700" cy="75" rx="100" ry="50" fill="#90EE90" stroke="#000" />
|
18 |
+
<text x="700" y="80" fill="#000" font-size="14" text-anchor="middle">Simple EDA</text>
|
19 |
+
|
20 |
+
<!-- Data Preprocessing -->
|
21 |
+
<rect x="50" y="200" width="200" height="50" fill="#FFD700" stroke="#000" />
|
22 |
+
<text x="150" y="230" fill="#000" font-size="14" text-anchor="middle">Data Preprocessing</text>
|
23 |
+
|
24 |
+
<!-- EDA -->
|
25 |
+
<circle cx="400" cy="225" r="50" fill="#FF7F50" stroke="#000" />
|
26 |
+
<text x="400" y="230" fill="#000" font-size="14" text-anchor="middle">EDA</text>
|
27 |
+
|
28 |
+
<!-- Feature Engineering -->
|
29 |
+
<ellipse cx="700" cy="225" rx="100" ry="50" fill="#9370DB" stroke="#000" />
|
30 |
+
<text x="700" y="230" fill="#000" font-size="14" text-anchor="middle">Feature Engineering</text>
|
31 |
+
|
32 |
+
<!-- Training -->
|
33 |
+
<rect x="50" y="350" width="200" height="50" fill="#FF6347" stroke="#000" />
|
34 |
+
<text x="150" y="380" fill="#000" font-size="14" text-anchor="middle">Training</text>
|
35 |
+
|
36 |
+
<!-- Testing -->
|
37 |
+
<circle cx="400" cy="375" r="50" fill="#98FB98" stroke="#000" />
|
38 |
+
<text x="400" y="380" fill="#000" font-size="14" text-anchor="middle">Testing</text>
|
39 |
+
|
40 |
+
<!-- Deploying -->
|
41 |
+
<ellipse cx="700" cy="375" rx="100" ry="50" fill="#F0E68C" stroke="#000" />
|
42 |
+
<text x="700" y="380" fill="#000" font-size="14" text-anchor="middle">Deploying</text>
|
43 |
+
|
44 |
+
<!-- Monitoring -->
|
45 |
+
<rect x="350" y="500" width="200" height="50" fill="#B0E0E6" stroke="#000" />
|
46 |
+
<text x="450" y="530" fill="#000" font-size="14" text-anchor="middle">Monitoring</text>
|
47 |
+
|
48 |
+
<!-- Arrows -->
|
49 |
+
<line x1="250" y1="75" x2="350" y2="75" stroke="#000" marker-end="url(#arrow)" />
|
50 |
+
<line x1="450" y1="75" x2="600" y2="75" stroke="#000" marker-end="url(#arrow)" />
|
51 |
+
<line x1="250" y1="225" x2="350" y2="225" stroke="#000" marker-end="url(#arrow)" />
|
52 |
+
<line x1="450" y1="225" x2="600" y2="225" stroke="#000" marker-end="url(#arrow)" />
|
53 |
+
<line x1="250" y1="375" x2="350" y2="375" stroke="#000" marker-end="url(#arrow)" />
|
54 |
+
<line x1="450" y1="375" x2="600" y2="375" stroke="#000" marker-end="url(#arrow)" />
|
55 |
+
<line x1="600" y1="375" x2="450" y2="500" stroke="#000" marker-end="url(#arrow)" />
|
56 |
+
|
57 |
+
<!-- Define arrow marker -->
|
58 |
+
<defs>
|
59 |
+
<marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="4" markerHeight="4" orient="auto">
|
60 |
+
<polygon points="0,0 10,5 0,10" fill="#000" />
|
61 |
+
</marker>
|
62 |
+
</defs>
|
63 |
</svg>
|
64 |
"""
|
65 |
+
|
66 |
+
# Display the diagram
|
|
|
67 |
st.markdown(html_content, unsafe_allow_html=True)
|
68 |
+
|
69 |
+
# Add buttons for interaction
|
70 |
+
st.subheader("Interactive ML Life Cycle")
|
71 |
+
|
72 |
if st.button("Problem Statement"):
|
73 |
+
st.write("Understanding the problem and setting objectives for the ML model.")
|
74 |
if st.button("Data Collection"):
|
75 |
+
st.write("Gathering relevant data for model training.")
|
76 |
if st.button("Simple EDA"):
|
77 |
+
st.write("Initial analysis to understand the dataset's basic properties.")
|
78 |
if st.button("Data Preprocessing"):
|
79 |
+
st.write("Cleaning the data to ensure it's in a usable format.")
|
80 |
if st.button("EDA"):
|
81 |
+
st.write("Deeper analysis to gain insights and find patterns in the data.")
|
82 |
if st.button("Feature Engineering"):
|
83 |
+
st.write("Creating new features or modifying existing ones to improve model performance.")
|
84 |
if st.button("Training"):
|
85 |
+
st.write("Training machine learning models using the processed data.")
|
86 |
if st.button("Testing"):
|
87 |
+
st.write("Evaluating the trained model using a test set to assess its performance.")
|
88 |
if st.button("Deploying"):
|
89 |
+
st.write("Deploying the model to a production environment.")
|
90 |
if st.button("Monitoring"):
|
91 |
+
st.write("Continuously monitoring the model's performance in the production environment.")
|