Spaces:
Sleeping
Sleeping
Update pages/3Life Cycle of Machine Learning Project.py
Browse files
pages/3Life Cycle of Machine Learning Project.py
CHANGED
|
@@ -45,9 +45,7 @@ st.markdown("""
|
|
| 45 |
<h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
|
| 46 |
|
| 47 |
|
| 48 |
-
import streamlit as st
|
| 49 |
|
| 50 |
-
# Inject custom CSS for the vertical flowchart
|
| 51 |
st.markdown(
|
| 52 |
"""
|
| 53 |
<style>
|
|
@@ -59,6 +57,7 @@ st.markdown(
|
|
| 59 |
flex-direction: column;
|
| 60 |
align-items: center;
|
| 61 |
}
|
|
|
|
| 62 |
/* Styling for each phase (rectangle button) */
|
| 63 |
.phase {
|
| 64 |
position: relative;
|
|
@@ -79,7 +78,8 @@ st.markdown(
|
|
| 79 |
transition: transform 0.3s ease, background-color 0.3s ease;
|
| 80 |
color: black; /* Always black text */
|
| 81 |
}
|
| 82 |
-
|
|
|
|
| 83 |
.phase-1 { background-color: #E6F4EA; } /* Light Green */
|
| 84 |
.phase-2 { background-color: #E0F7FA; } /* Light Blue */
|
| 85 |
.phase-3 { background-color: #FFF9C4; } /* Light Yellow */
|
|
@@ -90,46 +90,95 @@ st.markdown(
|
|
| 90 |
.phase-8 { background-color: #CFD8DC; } /* Light Gray-Blue */
|
| 91 |
.phase-9 { background-color: #B2EBF2; } /* Light Cyan */
|
| 92 |
.phase-10 { background-color: #FFE082; } /* Light Amber */
|
|
|
|
| 93 |
.phase:hover {
|
| 94 |
transform: scale(1.05);
|
| 95 |
background-color: #F0F0F0; /* Slightly lighter on hover */
|
| 96 |
color: black; /* Ensure text remains black */
|
| 97 |
}
|
|
|
|
| 98 |
/* Arrow styling */
|
| 99 |
.arrow {
|
| 100 |
font-size: 24px; /* Arrow size */
|
| 101 |
color: #4F4F4F; /* Dark arrow color */
|
| 102 |
margin: 10px 0; /* Space for arrow */
|
| 103 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
</style>
|
| 105 |
""",
|
| 106 |
unsafe_allow_html=True,
|
| 107 |
)
|
| 108 |
|
| 109 |
-
# HTML structure for the vertical flowchart
|
| 110 |
st.markdown(
|
| 111 |
"""
|
| 112 |
<div class="vertical-flowchart">
|
| 113 |
-
<!--
|
| 114 |
<a href="/problem-statement" class="phase phase-1" target="_self">Problem Statement</a>
|
|
|
|
| 115 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 116 |
<a href="/data-collection" class="phase phase-2" target="_self">Data Collection</a>
|
|
|
|
| 117 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 118 |
<a href="/simple-eda" class="phase phase-3" target="_self">Simple EDA</a>
|
|
|
|
| 119 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 120 |
<a href="/data-preprocessing" class="phase phase-4" target="_self">Data Preprocessing</a>
|
|
|
|
|
|
|
|
|
|
| 121 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 122 |
<a href="/eda" class="phase phase-5" target="_self">EDA</a>
|
|
|
|
| 123 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 124 |
<a href="/feature-engineering" class="phase phase-6" target="_self">Feature Engineering</a>
|
|
|
|
| 125 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 126 |
<a href="/model-training" class="phase phase-7" target="_self">Model Training</a>
|
|
|
|
| 127 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 128 |
<a href="/model-testing" class="phase phase-8" target="_self">Model Testing</a>
|
|
|
|
| 129 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 130 |
<a href="/deployment" class="phase phase-9" target="_self">Deployment</a>
|
|
|
|
| 131 |
<div class="arrow">⬇️</div>
|
|
|
|
|
|
|
| 132 |
<a href="/monitoring" class="phase phase-10" target="_self">Monitoring</a>
|
|
|
|
| 133 |
</div>
|
| 134 |
""",
|
| 135 |
unsafe_allow_html=True,
|
|
|
|
| 45 |
<h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
|
| 46 |
|
| 47 |
|
|
|
|
| 48 |
|
|
|
|
| 49 |
st.markdown(
|
| 50 |
"""
|
| 51 |
<style>
|
|
|
|
| 57 |
flex-direction: column;
|
| 58 |
align-items: center;
|
| 59 |
}
|
| 60 |
+
|
| 61 |
/* Styling for each phase (rectangle button) */
|
| 62 |
.phase {
|
| 63 |
position: relative;
|
|
|
|
| 78 |
transition: transform 0.3s ease, background-color 0.3s ease;
|
| 79 |
color: black; /* Always black text */
|
| 80 |
}
|
| 81 |
+
|
| 82 |
+
/* Colors for each phase */
|
| 83 |
.phase-1 { background-color: #E6F4EA; } /* Light Green */
|
| 84 |
.phase-2 { background-color: #E0F7FA; } /* Light Blue */
|
| 85 |
.phase-3 { background-color: #FFF9C4; } /* Light Yellow */
|
|
|
|
| 90 |
.phase-8 { background-color: #CFD8DC; } /* Light Gray-Blue */
|
| 91 |
.phase-9 { background-color: #B2EBF2; } /* Light Cyan */
|
| 92 |
.phase-10 { background-color: #FFE082; } /* Light Amber */
|
| 93 |
+
|
| 94 |
.phase:hover {
|
| 95 |
transform: scale(1.05);
|
| 96 |
background-color: #F0F0F0; /* Slightly lighter on hover */
|
| 97 |
color: black; /* Ensure text remains black */
|
| 98 |
}
|
| 99 |
+
|
| 100 |
/* Arrow styling */
|
| 101 |
.arrow {
|
| 102 |
font-size: 24px; /* Arrow size */
|
| 103 |
color: #4F4F4F; /* Dark arrow color */
|
| 104 |
margin: 10px 0; /* Space for arrow */
|
| 105 |
}
|
| 106 |
+
|
| 107 |
+
/* Styling for descriptions */
|
| 108 |
+
.description {
|
| 109 |
+
display: none; /* Hidden by default */
|
| 110 |
+
width: 300px;
|
| 111 |
+
margin-top: -10px;
|
| 112 |
+
background-color: #F9F9F9;
|
| 113 |
+
color: #333;
|
| 114 |
+
font-size: 14px;
|
| 115 |
+
border-radius: 5px;
|
| 116 |
+
padding: 10px;
|
| 117 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.phase:hover + .description {
|
| 121 |
+
display: block; /* Show description on hover */
|
| 122 |
+
}
|
| 123 |
</style>
|
| 124 |
""",
|
| 125 |
unsafe_allow_html=True,
|
| 126 |
)
|
| 127 |
|
| 128 |
+
# HTML structure for the vertical flowchart with descriptions
|
| 129 |
st.markdown(
|
| 130 |
"""
|
| 131 |
<div class="vertical-flowchart">
|
| 132 |
+
<!-- Problem Statement -->
|
| 133 |
<a href="/problem-statement" class="phase phase-1" target="_self">Problem Statement</a>
|
| 134 |
+
<div class="description"> Problem Statement clearly state what the ML model will do, the data it will use, and the result it aims to deliver. Focus on its main goal and how it addresses the specific problem. .</div>
|
| 135 |
<div class="arrow">⬇️</div>
|
| 136 |
+
|
| 137 |
+
<!-- Data Collection -->
|
| 138 |
<a href="/data-collection" class="phase phase-2" target="_self">Data Collection</a>
|
| 139 |
+
<div class="description">GCollect relevant data from multiple sources like APIs, databases, or user-generated content. Ensure the data aligns with the problem statement..</div>
|
| 140 |
<div class="arrow">⬇️</div>
|
| 141 |
+
|
| 142 |
+
<!-- Simple EDA -->
|
| 143 |
<a href="/simple-eda" class="phase phase-3" target="_self">Simple EDA</a>
|
| 144 |
+
<div class="description">Perform an initial exploratory analysis to understand data quality, structure, and how the data looks.div>
|
| 145 |
<div class="arrow">⬇️</div>
|
| 146 |
+
|
| 147 |
+
<!-- Data Preprocessing -->
|
| 148 |
<a href="/data-preprocessing" class="phase phase-4" target="_self">Data Preprocessing</a>
|
| 149 |
+
<div class="description">Clean the dataset by handling missing values, outliers, and inconsistencies. Transform data into a format suitable for analysis and modeling.
|
| 150 |
+
|
| 151 |
+
</div>
|
| 152 |
<div class="arrow">⬇️</div>
|
| 153 |
+
|
| 154 |
+
<!-- EDA -->
|
| 155 |
<a href="/eda" class="phase phase-5" target="_self">EDA</a>
|
| 156 |
+
<div class="description">Perform a detailed analysis of the data to uncover trends, relationships, and patterns that will guide the model-building process..</div>
|
| 157 |
<div class="arrow">⬇️</div>
|
| 158 |
+
|
| 159 |
+
<!-- Feature Engineering -->
|
| 160 |
<a href="/feature-engineering" class="phase phase-6" target="_self">Feature Engineering</a>
|
| 161 |
+
<div class="description">Create or select meaningful features, scale variables, and reduce dimensionality to improve the model’s learning process and accuracy.</div>
|
| 162 |
<div class="arrow">⬇️</div>
|
| 163 |
+
|
| 164 |
+
<!-- Model Training -->
|
| 165 |
<a href="/model-training" class="phase phase-7" target="_self">Model Training</a>
|
| 166 |
+
<div class="description">Use the prepared dataset to train machine learning algorithms. Optimize parameters to achieve the best possible model performance.</div>
|
| 167 |
<div class="arrow">⬇️</div>
|
| 168 |
+
|
| 169 |
+
<!-- Model Testing -->
|
| 170 |
<a href="/model-testing" class="phase phase-8" target="_self">Model Testing</a>
|
| 171 |
+
<div class="description">Evaluate the trained model on a validation or test dataset. Assess performance metrics like accuracy, precision, recall, and F1 score.</div>
|
| 172 |
<div class="arrow">⬇️</div>
|
| 173 |
+
|
| 174 |
+
<!-- Deployment -->
|
| 175 |
<a href="/deployment" class="phase phase-9" target="_self">Deployment</a>
|
| 176 |
+
<div class="description">Deploy the trained model into a live production system or application, ensuring it can process real-time or batch inputs..</div>
|
| 177 |
<div class="arrow">⬇️</div>
|
| 178 |
+
|
| 179 |
+
<!-- Monitoring -->
|
| 180 |
<a href="/monitoring" class="phase phase-10" target="_self">Monitoring</a>
|
| 181 |
+
<div class="description">Continuously track the model’s performance in production. Identify and address issues like data drift or model degradation to maintain reliability.</div>
|
| 182 |
</div>
|
| 183 |
""",
|
| 184 |
unsafe_allow_html=True,
|