Spaces:
Sleeping
Sleeping
Update pages/Life_cycle_of_ML.py
Browse files- pages/Life_cycle_of_ML.py +87 -28
pages/Life_cycle_of_ML.py
CHANGED
@@ -84,39 +84,98 @@ The life cycle of Machine Learning (ML) involves several stages, from defining t
|
|
84 |
</marker>
|
85 |
</defs>
|
86 |
</svg>
|
|
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
<!-- Problem Statement Button (Rectangle) -->
|
91 |
-
<button style="width: 150px; height: 50px; background-color: #FFB6C1; border: 1px solid #000; text-align: center;">Problem Statement</button>
|
92 |
-
<st.write("Understanding the problem and setting objectives for the ML model.")>
|
93 |
-
|
94 |
-
<!-- Data Collection Button (Ellipse) -->
|
95 |
-
<button style="width: 160px; height: 80px; background-color: #ADD8E6; border-radius: 40px; border: 1px solid #000; text-align: center;">Data Collection</button>
|
96 |
-
|
97 |
-
<!-- Simple EDA Button (Ellipse) -->
|
98 |
-
<button style="width: 160px; height: 80px; background-color: #90EE90; border-radius: 40px; border: 1px solid #000; text-align: center;">Simple EDA</button>
|
99 |
-
|
100 |
-
<!-- Data Preprocessing Button (Rectangle) -->
|
101 |
-
<button style="width: 150px; height: 50px; background-color: #FFD700; border: 1px solid #000; text-align: center;">Data Preprocessing</button>
|
102 |
-
|
103 |
-
<!-- EDA Button (Circle) -->
|
104 |
-
<button style="width: 80px; height: 80px; background-color: #FF7F50; border-radius: 50%; border: 1px solid #000; text-align: center;">EDA</button>
|
105 |
-
|
106 |
-
<!-- Feature Engineering Button (Ellipse) -->
|
107 |
-
<button style="width: 160px; height: 80px; background-color: #9370DB; border-radius: 40px; border: 1px solid #000; text-align: center;">Feature Engineering</button>
|
108 |
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
-
|
113 |
-
|
114 |
|
115 |
-
|
116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
-
<!-- Monitoring Button (Rectangle) -->
|
119 |
-
<button style="width: 150px; height: 50px; background-color: #B0E0E6; border: 1px solid #000; text-align: center;">Monitoring</button>
|
120 |
"""
|
121 |
|
122 |
# Render HTML content in Streamlit
|
|
|
84 |
</marker>
|
85 |
</defs>
|
86 |
</svg>
|
87 |
+
import streamlit as st
|
88 |
|
89 |
+
# Render the life cycle process with interactive buttons
|
90 |
+
st.title("Machine Learning Life Cycle")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
+
# HTML content inside a string for correct SVG rendering
|
93 |
+
html_content = """
|
94 |
+
<svg width="800" height="650">
|
95 |
+
<!-- Problem Statement -->
|
96 |
+
<rect x="50" y="50" width="200" height="50" fill="#FFB6C1" stroke="#000" />
|
97 |
+
<text x="75" y="80" fill="#000" font-size="14" text-anchor="middle">Problem Statement</text>
|
98 |
+
|
99 |
+
<!-- Data Collection -->
|
100 |
+
<circle cx="400" cy="75" r="50" fill="#ADD8E6" stroke="#000" />
|
101 |
+
<text x="400" y="80" fill="#000" font-size="14" text-anchor="middle">Data Collection</text>
|
102 |
+
|
103 |
+
<!-- Simple EDA -->
|
104 |
+
<ellipse cx="700" cy="75" rx="100" ry="50" fill="#90EE90" stroke="#000" />
|
105 |
+
<text x="700" y="80" fill="#000" font-size="14" text-anchor="middle">Simple EDA</text>
|
106 |
+
|
107 |
+
<!-- Data Preprocessing -->
|
108 |
+
<rect x="50" y="200" width="200" height="50" fill="#FFD700" stroke="#000" />
|
109 |
+
<text x="150" y="230" fill="#000" font-size="14" text-anchor="middle">Data Preprocessing</text>
|
110 |
+
|
111 |
+
<!-- EDA -->
|
112 |
+
<circle cx="400" cy="225" r="50" fill="#FF7F50" stroke="#000" />
|
113 |
+
<text x="400" y="230" fill="#000" font-size="14" text-anchor="middle">EDA</text>
|
114 |
+
|
115 |
+
<!-- Feature Engineering -->
|
116 |
+
<ellipse cx="700" cy="225" rx="100" ry="50" fill="#9370DB" stroke="#000" />
|
117 |
+
<text x="700" y="230" fill="#000" font-size="14" text-anchor="middle">Feature Engineering</text>
|
118 |
+
|
119 |
+
<!-- Training -->
|
120 |
+
<rect x="50" y="350" width="200" height="50" fill="#FF6347" stroke="#000" />
|
121 |
+
<text x="150" y="380" fill="#000" font-size="14" text-anchor="middle">Training</text>
|
122 |
+
|
123 |
+
<!-- Testing -->
|
124 |
+
<circle cx="400" cy="375" r="50" fill="#98FB98" stroke="#000" />
|
125 |
+
<text x="400" y="380" fill="#000" font-size="14" text-anchor="middle">Testing</text>
|
126 |
+
|
127 |
+
<!-- Deploying -->
|
128 |
+
<ellipse cx="700" cy="375" rx="100" ry="50" fill="#F0E68C" stroke="#000" />
|
129 |
+
<text x="700" y="380" fill="#000" font-size="14" text-anchor="middle">Deploying</text>
|
130 |
+
|
131 |
+
<!-- Monitoring -->
|
132 |
+
<rect x="350" y="500" width="200" height="50" fill="#B0E0E6" stroke="#000" />
|
133 |
+
<text x="450" y="530" fill="#000" font-size="14" text-anchor="middle">Monitoring</text>
|
134 |
+
|
135 |
+
<!-- Arrows -->
|
136 |
+
<line x1="250" y1="75" x2="350" y2="75" stroke="#000" marker-end="url(#arrow)" />
|
137 |
+
<line x1="450" y1="75" x2="600" y2="75" stroke="#000" marker-end="url(#arrow)" />
|
138 |
+
<line x1="250" y1="225" x2="350" y2="225" stroke="#000" marker-end="url(#arrow)" />
|
139 |
+
<line x1="450" y1="225" x2="600" y2="225" stroke="#000" marker-end="url(#arrow)" />
|
140 |
+
<line x1="250" y1="375" x2="350" y2="375" stroke="#000" marker-end="url(#arrow)" />
|
141 |
+
<line x1="450" y1="375" x2="600" y2="375" stroke="#000" marker-end="url(#arrow)" />
|
142 |
+
<line x1="600" y1="375" x2="450" y2="500" stroke="#000" marker-end="url(#arrow)" />
|
143 |
+
|
144 |
+
<!-- Define arrow marker -->
|
145 |
+
<defs>
|
146 |
+
<marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="4" markerHeight="4" orient="auto">
|
147 |
+
<polygon points="0,0 10,5 0,10" fill="#000" />
|
148 |
+
</marker>
|
149 |
+
</defs>
|
150 |
+
</svg>
|
151 |
+
"""
|
152 |
|
153 |
+
# Render the SVG
|
154 |
+
st.markdown(html_content, unsafe_allow_html=True)
|
155 |
|
156 |
+
# Interactive buttons for stages
|
157 |
+
st.subheader("Stages in ML Life Cycle")
|
158 |
+
if st.button("Problem Statement"):
|
159 |
+
st.write("Understanding the problem and setting objectives for the ML model.")
|
160 |
+
if st.button("Data Collection"):
|
161 |
+
st.write("Gathering relevant data for model training.")
|
162 |
+
if st.button("Simple EDA"):
|
163 |
+
st.write("Initial analysis to understand the dataset's basic properties.")
|
164 |
+
if st.button("Data Preprocessing"):
|
165 |
+
st.write("Cleaning the data to ensure it's in a usable format.")
|
166 |
+
if st.button("EDA"):
|
167 |
+
st.write("Deeper analysis to gain insights and find patterns in the data.")
|
168 |
+
if st.button("Feature Engineering"):
|
169 |
+
st.write("Creating new features or modifying existing ones to improve model performance.")
|
170 |
+
if st.button("Training"):
|
171 |
+
st.write("Training machine learning models using the processed data.")
|
172 |
+
if st.button("Testing"):
|
173 |
+
st.write("Evaluating the trained model using a test set to assess its performance.")
|
174 |
+
if st.button("Deploying"):
|
175 |
+
st.write("Deploying the model to a production environment.")
|
176 |
+
if st.button("Monitoring"):
|
177 |
+
st.write("Continuously monitoring the model's performance in the production environment.")
|
178 |
|
|
|
|
|
179 |
"""
|
180 |
|
181 |
# Render HTML content in Streamlit
|