Spaces:
Running
Running
import streamlit as st | |
# Function to display lifecycle descriptions | |
def display_lifecycle_stage(stage_name, description): | |
st.subheader(stage_name) | |
st.write(description) | |
# Title | |
st.title("Enhanced Machine Learning Life Cycle") | |
# Markdown Diagram with Shapes and Colors | |
st.markdown( | |
""" | |
<style> | |
.shape-box { | |
background-color: rgba(255, 221, 193, 0.8); | |
padding: 10px; | |
border-radius: 5px; | |
text-align: center; | |
margin-bottom: 10px; | |
} | |
.shape-circle { | |
background-color: rgba(193, 225, 255, 0.8); | |
padding: 10px; | |
border-radius: 50%; | |
text-align: center; | |
margin-bottom: 10px; | |
} | |
.shape-diamond { | |
background-color: rgba(193, 255, 193, 0.8); | |
padding: 10px; | |
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); | |
text-align: center; | |
margin-bottom: 10px; | |
} | |
</style> | |
<div class="shape-box">Problem Statement</div> | |
<div class="shape-circle">Data Collection</div> | |
<div class="shape-box">Simple EDA</div> | |
<div class="shape-diamond">Data Preprocessing</div> | |
<div class="shape-box">EDA</div> | |
<div class="shape-circle">Feature Engineering</div> | |
<div class="shape-box">Training</div> | |
<div class="shape-diamond">Testing</div> | |
<div class="shape-box">Deploying</div> | |
<div class="shape-circle">Monitoring</div> | |
""", | |
unsafe_allow_html=True, | |
) | |
# Buttons for each stage | |
st.markdown("### Select a Lifecycle Stage to Learn More:") | |
col1, col2 = st.columns(2) | |
with col1: | |
if st.button("Problem Statement"): | |
display_lifecycle_stage( | |
"Problem Statement", | |
"Defining the problem and setting objectives for the machine learning project." | |
) | |
if st.button("Simple EDA"): | |
display_lifecycle_stage( | |
"Simple EDA", | |
"Performing initial exploratory data analysis to understand data distribution and trends." | |
) | |
if st.button("EDA"): | |
display_lifecycle_stage( | |
"EDA", | |
"Detailed exploratory data analysis for deeper insights into data patterns." | |
) | |
if st.button("Training"): | |
display_lifecycle_stage( | |
"Training", | |
"Fitting the model using the training dataset to learn patterns and relationships." | |
) | |
if st.button("Deploying"): | |
display_lifecycle_stage( | |
"Deploying", | |
"Deploying the trained model to production for real-world use." | |
) | |
with col2: | |
if st.button("Data Collection"): | |
st.switch_page("pages/Data_Collection.py") | |
display_lifecycle_stage( | |
"Data Collection", | |
"Gathering the data required for the machine learning project." | |
) | |
if st.button("Data Preprocessing"): | |
display_lifecycle_stage( | |
"Data Preprocessing", | |
"Cleaning and transforming the data to prepare it for analysis." | |
) | |
if st.button("Feature Engineering"): | |
display_lifecycle_stage( | |
"Feature Engineering", | |
"Creating new features or modifying existing ones to improve model performance." | |
) | |
if st.button("Testing"): | |
display_lifecycle_stage( | |
"Testing", | |
"Evaluating the model's performance using a separate testing dataset." | |
) | |
if st.button("Monitoring"): | |
display_lifecycle_stage( | |
"Monitoring", | |
"Monitoring the deployed model's performance and maintaining its accuracy." | |
) | |