import streamlit as st # Initialize session state for tracking the current lifecycle step if "step" not in st.session_state: st.session_state.step = 0 # Define ML lifecycle steps with detailed descriptions ml_lifecycle = [ { "title": "📋 **Problem Statement**", "description": """ **Info**: Understand the challenge at hand, establish clear objectives, and set criteria for success. """ }, { "title": "🧑‍💻 **Data Collection**", "description": """ **Info**: Gather relevant data to train the model, utilizing sources such as surveys, web scraping, and APIs. """ }, { "title": "🔍**Simple EDA**", "description": """ **Info**: Perform a preliminary analysis to examine the dataset’s key features. """ }, { "title": "🧹 **Data Preprocessing**", "description": """ **Info**: Clean the data to make sure it is in an appropriate format for further analysis. """ }, { "title": "🔎 **EDA**", "description": """ **Info**:Conduct deeper analysis to extract valuable insights and uncover patterns within the data. """ }, { "title": "🔧 **Feature Engineering**", "description": """ **Info**: Develop new features or refine existing ones to enhance the model’s performance. """ }, { "title": "🛠️ **Training**", "description": """ **Info**:Train machine learning models using the preprocessed data. """ }, { "title": "🧪 **Testing**", "description": """ **Info**:Assess the model’s performance using a separate test dataset to determine its effectiveness. """ }, { "title": "🚀 **Deploying**", "description": """ **Info**:Deploy the trained model into a production environment for real-world use. """ }, { "title": "📊 **Monitoring**", "description": """ **Info**:Continuously track the model’s performance in production to ensure it remains effective over time """ }, ] # Display title and description st.title("📊 Machine Learning Life Cycle") st.write("Explore the detailed life cycle of a Machine Learning project by clicking through the steps below:") # Buttons for navigation col1, col2, col3 = st.columns([1, 1, 1]) with col1: if st.button("⬅️ Previous", disabled=st.session_state.step == 0): st.session_state.step -= 1 with col3: if st.button("➡️ Next", disabled=st.session_state.step == len(ml_lifecycle) - 1): st.session_state.step += 1 # Display the current lifecycle step with details current_step = ml_lifecycle[st.session_state.step] st.markdown(f"### {current_step['title']}") st.markdown(current_step['description']) # Reset button if st.button("🔄 Restart"): st.session_state.step = 0 # HTML content for shapes and buttons html_content = """ # Life Cycle of ML The life cycle of Machine Learning (ML) involves several stages, from defining the problem to deploying and monitoring the model. Here's an overview of each stage: 1. **Problem Statement:** Understanding the problem and setting objectives for the ML model. 2. **Data Collection:** Gathering relevant data for model training. 3. **Simple EDA (Exploratory Data Analysis):** Initial analysis to understand the dataset's basic properties. 4. **Data Preprocessing:** Cleaning the data to ensure it's in a usable format. 5. **EDA (Exploratory Data Analysis):** Deeper analysis to gain insights and find patterns in the data. 6. **Feature Engineering:** Creating new features or modifying existing ones to improve model performance. 7. **Training:** Training machine learning models using the processed data. 8. **Testing:** Evaluating the trained model using a test set to assess its performance. 9. **Deploying:** Deploying the model to a production environment. 10. **Monitoring:** Continuously monitoring the model's performance in the production environment. --- ## Shapes Representing the ML Life Cycle Problem Statement Data Collection Simple EDA Data Preprocessing EDA Feature Engineering Training Testing Deploying Monitoring """ # Add the HTML content to the streamlit app st.markdown(html_content, unsafe_allow_html=True)