Spaces:
Sleeping
Sleeping
Update pages/3Life Cycle of Machine Learning Project.py
Browse files
pages/3Life Cycle of Machine Learning Project.py
CHANGED
|
@@ -10,17 +10,17 @@ st.set_page_config(
|
|
| 10 |
st.markdown("""
|
| 11 |
<style>
|
| 12 |
body, .stApp {
|
| 13 |
-
color: #4F4F4F;
|
| 14 |
-
background-color: #FFFFFF;
|
| 15 |
}
|
| 16 |
h1, h2, h3, h4, h5, h6 {
|
| 17 |
-
color: #BB3385;
|
| 18 |
}
|
| 19 |
p {
|
| 20 |
-
color: #4F4F4F;
|
| 21 |
}
|
| 22 |
ul li {
|
| 23 |
-
color: #4F4F4F;
|
| 24 |
}
|
| 25 |
</style>
|
| 26 |
""", unsafe_allow_html=True)
|
|
@@ -42,75 +42,66 @@ st.markdown(
|
|
| 42 |
# Title of the page
|
| 43 |
st.markdown("""<div style="text-align: center; margin-top: 20px;"><h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
|
| 44 |
|
| 45 |
-
#
|
| 46 |
st.markdown(
|
| 47 |
"""
|
| 48 |
<style>
|
| 49 |
-
.
|
| 50 |
-
position: relative;
|
| 51 |
width: 500px;
|
| 52 |
height: 500px;
|
|
|
|
| 53 |
margin: 0 auto;
|
| 54 |
-
display: flex;
|
| 55 |
-
justify-content: center;
|
| 56 |
-
align-items: center;
|
| 57 |
border-radius: 50%;
|
| 58 |
-
position: relative;
|
| 59 |
}
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
top: 50%;
|
| 63 |
-
left: 50%;
|
| 64 |
-
width: 100%;
|
| 65 |
-
height: 100%;
|
| 66 |
-
transform: translate(-50%, -50%);
|
| 67 |
-
}
|
| 68 |
-
.phase {
|
| 69 |
position: absolute;
|
| 70 |
-
width:
|
| 71 |
-
height:
|
| 72 |
-
|
| 73 |
-
font-size: 16px; /* Text size */
|
| 74 |
font-weight: bold;
|
| 75 |
text-align: center;
|
| 76 |
-
cursor: pointer;
|
| 77 |
-
font-family: Arial, sans-serif;
|
| 78 |
display: flex;
|
| 79 |
justify-content: center;
|
| 80 |
align-items: center;
|
|
|
|
|
|
|
|
|
|
| 81 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 82 |
transition: transform 0.3s ease, background-color 0.3s ease;
|
| 83 |
-
color: black; /* Always black text */
|
| 84 |
}
|
| 85 |
-
.phase-1 { background-color: #E6F4EA; } /* Light Green */
|
| 86 |
-
.phase-2 { background-color: #E0F7FA; } /* Light Blue */
|
| 87 |
-
.phase-3 { background-color: #FFF9C4; } /* Light Yellow */
|
| 88 |
-
.phase-4 { background-color: #FFE0B2; } /* Light Orange */
|
| 89 |
-
.phase-5 { background-color: #DCEDC8; } /* Light Green */
|
| 90 |
-
.phase-6 { background-color: #D1C4E9; } /* Light Purple */
|
| 91 |
-
.phase-7 { background-color: #F8BBD0; } /* Light Pink */
|
| 92 |
-
.phase-8 { background-color: #CFD8DC; } /* Light Gray-Blue */
|
| 93 |
-
.phase-9 { background-color: #B2EBF2; } /* Light Cyan */
|
| 94 |
-
.phase-10 { background-color: #FFE082; } /* Light Amber */
|
| 95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
.phase:hover {
|
| 97 |
transform: scale(1.05);
|
| 98 |
-
background-color: #F0F0F0;
|
| 99 |
-
color: black;
|
| 100 |
}
|
| 101 |
|
| 102 |
-
/*
|
| 103 |
.description {
|
| 104 |
-
display: none;
|
| 105 |
-
|
| 106 |
-
margin-top: -10px;
|
| 107 |
-
background-color: #F9F9F9;
|
| 108 |
color: #333;
|
| 109 |
font-size: 14px;
|
| 110 |
-
border-radius: 5px;
|
| 111 |
padding: 10px;
|
|
|
|
| 112 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
|
|
| 113 |
}
|
|
|
|
| 114 |
</style>
|
| 115 |
""",
|
| 116 |
unsafe_allow_html=True
|
|
@@ -119,39 +110,56 @@ st.markdown(
|
|
| 119 |
# HTML structure for the circular flowchart with descriptions
|
| 120 |
st.markdown(
|
| 121 |
"""
|
| 122 |
-
<div class="
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
</div>
|
| 156 |
|
| 157 |
<script>
|
|
|
|
| 10 |
st.markdown("""
|
| 11 |
<style>
|
| 12 |
body, .stApp {
|
| 13 |
+
color: #4F4F4F;
|
| 14 |
+
background-color: #FFFFFF;
|
| 15 |
}
|
| 16 |
h1, h2, h3, h4, h5, h6 {
|
| 17 |
+
color: #BB3385;
|
| 18 |
}
|
| 19 |
p {
|
| 20 |
+
color: #4F4F4F;
|
| 21 |
}
|
| 22 |
ul li {
|
| 23 |
+
color: #4F4F4F;
|
| 24 |
}
|
| 25 |
</style>
|
| 26 |
""", unsafe_allow_html=True)
|
|
|
|
| 42 |
# Title of the page
|
| 43 |
st.markdown("""<div style="text-align: center; margin-top: 20px;"><h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
|
| 44 |
|
| 45 |
+
# Custom CSS for circular flowchart layout
|
| 46 |
st.markdown(
|
| 47 |
"""
|
| 48 |
<style>
|
| 49 |
+
.circle-container {
|
|
|
|
| 50 |
width: 500px;
|
| 51 |
height: 500px;
|
| 52 |
+
position: relative;
|
| 53 |
margin: 0 auto;
|
|
|
|
|
|
|
|
|
|
| 54 |
border-radius: 50%;
|
|
|
|
| 55 |
}
|
| 56 |
+
|
| 57 |
+
.circle-container .phase {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
position: absolute;
|
| 59 |
+
width: 200px;
|
| 60 |
+
height: 50px;
|
| 61 |
+
font-size: 16px;
|
|
|
|
| 62 |
font-weight: bold;
|
| 63 |
text-align: center;
|
|
|
|
|
|
|
| 64 |
display: flex;
|
| 65 |
justify-content: center;
|
| 66 |
align-items: center;
|
| 67 |
+
border-radius: 8px;
|
| 68 |
+
cursor: pointer;
|
| 69 |
+
color: white;
|
| 70 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 71 |
transition: transform 0.3s ease, background-color 0.3s ease;
|
|
|
|
| 72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
+
/* Phase Colors */
|
| 75 |
+
.phase-1 { background-color: #FF6F61; }
|
| 76 |
+
.phase-2 { background-color: #4C9F70; }
|
| 77 |
+
.phase-3 { background-color: #2F8ED6; }
|
| 78 |
+
.phase-4 { background-color: #F1C40F; }
|
| 79 |
+
.phase-5 { background-color: #9B59B6; }
|
| 80 |
+
.phase-6 { background-color: #E74C3C; }
|
| 81 |
+
.phase-7 { background-color: #1ABC9C; }
|
| 82 |
+
.phase-8 { background-color: #F39C12; }
|
| 83 |
+
.phase-9 { background-color: #D35400; }
|
| 84 |
+
.phase-10 { background-color: #8E44AD; }
|
| 85 |
+
|
| 86 |
+
/* Hover effect */
|
| 87 |
.phase:hover {
|
| 88 |
transform: scale(1.05);
|
| 89 |
+
background-color: #F0F0F0;
|
| 90 |
+
color: black;
|
| 91 |
}
|
| 92 |
|
| 93 |
+
/* Descriptions */
|
| 94 |
.description {
|
| 95 |
+
display: none;
|
| 96 |
+
background-color: #FFFFFF;
|
|
|
|
|
|
|
| 97 |
color: #333;
|
| 98 |
font-size: 14px;
|
|
|
|
| 99 |
padding: 10px;
|
| 100 |
+
border-radius: 5px;
|
| 101 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 102 |
+
margin-top: 10px;
|
| 103 |
}
|
| 104 |
+
|
| 105 |
</style>
|
| 106 |
""",
|
| 107 |
unsafe_allow_html=True
|
|
|
|
| 110 |
# HTML structure for the circular flowchart with descriptions
|
| 111 |
st.markdown(
|
| 112 |
"""
|
| 113 |
+
<div class="circle-container">
|
| 114 |
+
<!-- Problem Statement -->
|
| 115 |
+
<a href="javascript:void(0)" class="phase phase-1" style="top: 0; left: 50%; transform: translateX(-50%) rotate(0deg);"
|
| 116 |
+
onclick="toggleDescription('desc1')">Problem Statement</a>
|
| 117 |
+
<div id="desc1" class="description">Clearly define the issue, the data used, and the expected outcome.</div>
|
| 118 |
+
|
| 119 |
+
<!-- Data Collection -->
|
| 120 |
+
<a href="javascript:void(0)" class="phase phase-2" style="top: 50%; left: 0; transform: translateY(-50%) rotate(36deg);"
|
| 121 |
+
onclick="toggleDescription('desc2')">Data Collection</a>
|
| 122 |
+
<div id="desc2" class="description">Collect relevant data from multiple sources, ensuring it aligns with the problem statement.</div>
|
| 123 |
+
|
| 124 |
+
<!-- Simple EDA -->
|
| 125 |
+
<a href="javascript:void(0)" class="phase phase-3" style="top: 100%; left: 50%; transform: translateX(-50%) rotate(72deg);"
|
| 126 |
+
onclick="toggleDescription('desc3')">Simple EDA</a>
|
| 127 |
+
<div id="desc3" class="description">Perform initial exploratory analysis to assess data quality, structure, and appearance.</div>
|
| 128 |
+
|
| 129 |
+
<!-- Data Preprocessing -->
|
| 130 |
+
<a href="javascript:void(0)" class="phase phase-4" style="top: 50%; right: 0; transform: translateY(-50%) rotate(108deg);"
|
| 131 |
+
onclick="toggleDescription('desc4')">Data Preprocessing</a>
|
| 132 |
+
<div id="desc4" class="description">Clean the dataset by handling missing values, outliers, and inconsistencies, transforming it into a suitable format.</div>
|
| 133 |
+
|
| 134 |
+
<!-- EDA -->
|
| 135 |
+
<a href="javascript:void(0)" class="phase phase-5" style="top: 0; right: 50%; transform: translateX(50%) rotate(144deg);"
|
| 136 |
+
onclick="toggleDescription('desc5')">EDA</a>
|
| 137 |
+
<div id="desc5" class="description">Perform detailed analysis to uncover trends, patterns, and relationships that will guide model building.</div>
|
| 138 |
+
|
| 139 |
+
<!-- Feature Engineering -->
|
| 140 |
+
<a href="javascript:void(0)" class="phase phase-6" style="top: 100%; right: 50%; transform: translateX(-50%) rotate(180deg);"
|
| 141 |
+
onclick="toggleDescription('desc6')">Feature Engineering</a>
|
| 142 |
+
<div id="desc6" class="description">Create or select meaningful features, scale variables, and reduce dimensionality to enhance model performance.</div>
|
| 143 |
+
|
| 144 |
+
<!-- Model Training -->
|
| 145 |
+
<a href="javascript:void(0)" class="phase phase-7" style="top: 50%; right: 50%; transform: translateY(-50%) rotate(216deg);"
|
| 146 |
+
onclick="toggleDescription('desc7')">Model Training</a>
|
| 147 |
+
<div id="desc7" class="description">Train machine learning models on the prepared data and optimize parameters for improved performance.</div>
|
| 148 |
+
|
| 149 |
+
<!-- Model Testing -->
|
| 150 |
+
<a href="javascript:void(0)" class="phase phase-8" style="top: 50%; left: 50%; transform: translateY(-50%) rotate(252deg);"
|
| 151 |
+
onclick="toggleDescription('desc8')">Model Testing</a>
|
| 152 |
+
<div id="desc8" class="description">Evaluate the trained model on a validation or test dataset to assess accuracy, precision, and other metrics.</div>
|
| 153 |
+
|
| 154 |
+
<!-- Deployment -->
|
| 155 |
+
<a href="javascript:void(0)" class="phase phase-9" style="top: 50%; left: 0; transform: translateY(-50%) rotate(288deg);"
|
| 156 |
+
onclick="toggleDescription('desc9')">Deployment</a>
|
| 157 |
+
<div id="desc9" class="description">Deploy the trained model into a live system for real-time or batch processing of new data.</div>
|
| 158 |
+
|
| 159 |
+
<!-- Monitoring -->
|
| 160 |
+
<a href="javascript:void(0)" class="phase phase-10" style="top: 50%; left: 0; transform: translateY(-50%) rotate(324deg);"
|
| 161 |
+
onclick="toggleDescription('desc10')">Monitoring</a>
|
| 162 |
+
<div id="desc10" class="description">Track model performance in production, addressing issues like data drift and performance degradation.</div>
|
| 163 |
</div>
|
| 164 |
|
| 165 |
<script>
|