Spaces:
Sleeping
Sleeping
Update pages/Life_cycle_of_ML.py
Browse files- pages/Life_cycle_of_ML.py +38 -97
pages/Life_cycle_of_ML.py
CHANGED
@@ -1,98 +1,8 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
# Define ML lifecycle steps with detailed descriptions
|
8 |
-
ml_lifecycle = [
|
9 |
-
{
|
10 |
-
"title": "📋 **Problem Statement**",
|
11 |
-
"description": """
|
12 |
-
**Info**:
|
13 |
-
Understand the challenge at hand, establish clear objectives, and set criteria for success.
|
14 |
-
"""
|
15 |
-
},
|
16 |
-
{
|
17 |
-
"title": "🧑💻 **Data Collection**",
|
18 |
-
"description": """
|
19 |
-
**Info**: Gather relevant data to train the model, utilizing sources such as surveys, web scraping, and APIs.
|
20 |
-
|
21 |
-
"""
|
22 |
-
},
|
23 |
-
{
|
24 |
-
"title": "🔍**Simple EDA**",
|
25 |
-
"description": """
|
26 |
-
**Info**: Perform a preliminary analysis to examine the dataset’s key features.
|
27 |
-
"""
|
28 |
-
},
|
29 |
-
{
|
30 |
-
"title": "🧹 **Data Preprocessing**",
|
31 |
-
"description": """
|
32 |
-
**Info**: Clean the data to make sure it is in an appropriate format for further analysis.
|
33 |
-
"""
|
34 |
-
},
|
35 |
-
{
|
36 |
-
"title": "🔎 **EDA**",
|
37 |
-
"description": """
|
38 |
-
**Info**:Conduct deeper analysis to extract valuable insights and uncover patterns within the data.
|
39 |
-
"""
|
40 |
-
},
|
41 |
-
{
|
42 |
-
"title": "🔧 **Feature Engineering**",
|
43 |
-
"description": """
|
44 |
-
**Info**: Develop new features or refine existing ones to enhance the model’s performance.
|
45 |
-
"""
|
46 |
-
},
|
47 |
-
{
|
48 |
-
"title": "🛠️ **Training**",
|
49 |
-
"description": """
|
50 |
-
**Info**:Train machine learning models using the preprocessed data.
|
51 |
-
"""
|
52 |
-
},
|
53 |
-
{
|
54 |
-
"title": "🧪 **Testing**",
|
55 |
-
"description": """
|
56 |
-
**Info**:Assess the model’s performance using a separate test dataset to determine its effectiveness.
|
57 |
-
"""
|
58 |
-
},
|
59 |
-
{
|
60 |
-
"title": "🚀 **Deploying**",
|
61 |
-
"description": """
|
62 |
-
**Info**:Deploy the trained model into a production environment for real-world use.
|
63 |
-
"""
|
64 |
-
},
|
65 |
-
{
|
66 |
-
"title": "📊 **Monitoring**",
|
67 |
-
"description": """
|
68 |
-
**Info**:Continuously track the model’s performance in production to ensure it remains effective over time
|
69 |
-
"""
|
70 |
-
},
|
71 |
-
]
|
72 |
-
|
73 |
-
# Display title and description
|
74 |
-
st.title("📊 Machine Learning Life Cycle")
|
75 |
-
st.write("Explore the detailed life cycle of a Machine Learning project by clicking through the steps below:")
|
76 |
-
|
77 |
-
# Buttons for navigation
|
78 |
-
col1, col2, col3 = st.columns([1, 1, 1])
|
79 |
-
with col1:
|
80 |
-
if st.button("⬅️ Previous", disabled=st.session_state.step == 0):
|
81 |
-
st.session_state.step -= 1
|
82 |
-
with col3:
|
83 |
-
if st.button("➡️ Next", disabled=st.session_state.step == len(ml_lifecycle) - 1):
|
84 |
-
st.session_state.step += 1
|
85 |
-
|
86 |
-
# Display the current lifecycle step with details
|
87 |
-
current_step = ml_lifecycle[st.session_state.step]
|
88 |
-
st.markdown(f"### {current_step['title']}")
|
89 |
-
st.markdown(current_step['description'])
|
90 |
-
|
91 |
-
# Reset button
|
92 |
-
if st.button("🔄 Restart"):
|
93 |
-
st.session_state.step = 0
|
94 |
-
|
95 |
-
# HTML content for shapes and buttons
|
96 |
html_content = """
|
97 |
# Life Cycle of ML
|
98 |
|
@@ -157,8 +67,8 @@ The life cycle of Machine Learning (ML) involves several stages, from defining t
|
|
157 |
<!-- Deploying (Ellipse) -->
|
158 |
<ellipse cx="500" cy="375" rx="80" ry="40" fill="#F0E68C" stroke="#000" />
|
159 |
<text x="500" y="380" fill="#000" font-size="14" text-anchor="middle">Deploying</text>
|
160 |
-
|
161 |
-
<!-- Arrows between Training, Testing, and Deploying -->
|
162 |
<line x1="125" y1="400" x2="260" y2="375" stroke="#000" marker-end="url(#arrow)" />
|
163 |
<line x1="380" y1="375" x2="460" y2="375" stroke="#000" marker-end="url(#arrow)" />
|
164 |
|
@@ -177,7 +87,38 @@ The life cycle of Machine Learning (ML) involves several stages, from defining t
|
|
177 |
</defs>
|
178 |
</svg>
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
"""
|
181 |
|
182 |
-
#
|
183 |
-
st.markdown(html_content, unsafe_allow_html=True)
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
import streamlit as st
|
4 |
+
|
5 |
+
# HTML content inside a string for correct syntax
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
html_content = """
|
7 |
# Life Cycle of ML
|
8 |
|
|
|
67 |
<!-- Deploying (Ellipse) -->
|
68 |
<ellipse cx="500" cy="375" rx="80" ry="40" fill="#F0E68C" stroke="#000" />
|
69 |
<text x="500" y="380" fill="#000" font-size="14" text-anchor="middle">Deploying</text>
|
70 |
+
|
71 |
+
<!-- Arrows between Training, Testing, and Deploying -->
|
72 |
<line x1="125" y1="400" x2="260" y2="375" stroke="#000" marker-end="url(#arrow)" />
|
73 |
<line x1="380" y1="375" x2="460" y2="375" stroke="#000" marker-end="url(#arrow)" />
|
74 |
|
|
|
87 |
</defs>
|
88 |
</svg>
|
89 |
|
90 |
+
<!-- Buttons below shapes -->
|
91 |
+
|
92 |
+
<!-- Problem Statement Button (Rectangle) -->
|
93 |
+
<button style="width: 150px; height: 50px; background-color: #FFB6C1; border: 1px solid #000; text-align: center;">Problem Statement</button>
|
94 |
+
|
95 |
+
<!-- Data Collection Button (Ellipse) -->
|
96 |
+
<button style="width: 160px; height: 80px; background-color: #ADD8E6; border-radius: 40px; border: 1px solid #000; text-align: center;">Data Collection</button>
|
97 |
+
|
98 |
+
<!-- Simple EDA Button (Ellipse) -->
|
99 |
+
<button style="width: 160px; height: 80px; background-color: #90EE90; border-radius: 40px; border: 1px solid #000; text-align: center;">Simple EDA</button>
|
100 |
+
|
101 |
+
<!-- Data Preprocessing Button (Rectangle) -->
|
102 |
+
<button style="width: 150px; height: 50px; background-color: #FFD700; border: 1px solid #000; text-align: center;">Data Preprocessing</button>
|
103 |
+
|
104 |
+
<!-- EDA Button (Circle) -->
|
105 |
+
<button style="width: 80px; height: 80px; background-color: #FF7F50; border-radius: 50%; border: 1px solid #000; text-align: center;">EDA</button>
|
106 |
+
|
107 |
+
<!-- Feature Engineering Button (Ellipse) -->
|
108 |
+
<button style="width: 160px; height: 80px; background-color: #9370DB; border-radius: 40px; border: 1px solid #000; text-align: center;">Feature Engineering</button>
|
109 |
+
|
110 |
+
<!-- Training Button (Rectangle) -->
|
111 |
+
<button style="width: 150px; height: 50px; background-color: #FF6347; border: 1px solid #000; text-align: center;">Training</button>
|
112 |
+
|
113 |
+
<!-- Testing Button (Circle) -->
|
114 |
+
<button style="width: 80px; height: 80px; background-color: #98FB98; border-radius: 50%; border: 1px solid #000; text-align: center;">Testing</button>
|
115 |
+
|
116 |
+
<!-- Deploying Button (Ellipse) -->
|
117 |
+
<button style="width: 160px; height: 80px; background-color: #F0E68C; border-radius: 40px; border: 1px solid #000; text-align: center;">Deploying</button>
|
118 |
+
|
119 |
+
<!-- Monitoring Button (Rectangle) -->
|
120 |
+
<button style="width: 150px; height: 50px; background-color: #B0E0E6; border: 1px solid #000; text-align: center;">Monitoring</button>
|
121 |
"""
|
122 |
|
123 |
+
# Render HTML content in Streamlit
|
124 |
+
st.markdown(html_content, unsafe_allow_html=True)
|