sree4411 commited on
Commit
b2bde06
ยท
verified ยท
1 Parent(s): 3466646

Update pages/3_Life Cycle Of ML Project.py

Browse files
Files changed (1) hide show
  1. pages/3_Life Cycle Of ML Project.py +35 -47
pages/3_Life Cycle Of ML Project.py CHANGED
@@ -1,58 +1,46 @@
1
  import streamlit as st
2
 
3
- # Function to display content based on button click
4
- def display_content(stage):
5
- if stage == "Overview":
6
- st.markdown("### Overview\nThis page guides you through the lifecycle of a machine learning project.It involves the following process.")
7
- elif stage == "Problem Statement":
 
 
 
 
 
 
 
 
 
 
8
  st.markdown("### Problem Statement\nIdentify the problem you want to solve and set clear objectives and success criteria.")
9
- elif stage == "Data Collection":
10
- st.markdown("### Data Collection\nGather relevant data from various sources and store it in a structured format.")elif st.session_state.page == "data_collection":
11
- elif st.session_state.page == "data_collection":
12
- st.markdown(""### data_collection\nThis page discusses the process of Data Collection.")
13
- elif stage == "Simple EDA":
14
- st.markdown("### Simple EDA\nPerform exploratory data analysis to understand data distributions and relationships..")
15
- elif stage == "Data Pre-Processing":
16
- st.markdown("### Data Pre-Processing\nhere we convert raw data into cleaned data, it involves two steps Cleaning and Transforming.")
17
- elif stage == "Exploratory Data Analysis (EDA)":
18
  st.markdown("### Exploratory Data Analysis (EDA)\nVisualize and analyze the data to understand its distributions and relationships.")
19
- elif stage == "Feature Engineering":
20
  st.markdown("### Feature Engineering\nHere we can create our own new features.")
21
- elif stage == "Model Training":
22
  st.markdown("### Model Training\nTrain the model using the training data and optimize its parameters.")
23
- elif stage == "Model Testing":
24
  st.markdown("### Model Testing\nAssess the model's performance using various metrics and cross-validation techniques.")
25
- elif stage == "Model Deployment":
26
  st.markdown("### Model Deployment\nIntegrate the trained model into a production environment and monitor its performance.")
27
- elif stage == "Monitoring":
28
  st.markdown("### Monitoring\nPeriodically retrain the model with new data and update features as needed.")
29
 
30
- # Title and Introduction
31
- st.title(":red[Lifecycle of a Machine Learning Project]")
32
- st.markdown("Click on a stage to learn more about it.")
33
-
34
- # Overview button
35
- if st.button(":blue[Overview]"):
36
- display_content("Overview")
37
 
38
- # Buttons for each stage with emojis
39
- if st.button(":blue[๐ŸŒŸ Problem Statement]"):
40
- display_content("Problem Statement")
41
- if st.button(":blue[๐Ÿ“Š Data_Collection]"):
42
- display_content("Data_Collection")
43
- if st.button(":blue[๐Ÿ› ๏ธ Simple EDA]")
44
- display_content("Simple EDA")
45
- if st.button(":blue[ Data Pre-Processing]"):
46
- display_content("Data Pre-Processing")
47
- if st.button(":blue[๐Ÿ“ˆExploratory Data Analysis (EDA)]"):
48
- display_content("Exploratory Data Analysis (EDA)")
49
- if st.button(":blue[๐Ÿ‹๏ธ Feature Engineering]"):
50
- display_content("Feature Engineering")
51
- if st.button(":blue[Model Training]"):
52
- display_content("Model Training")
53
- if st.button(":blue[๐Ÿ”งModel Testing]"):
54
- display_content("Model Testing")
55
- if st.button(":blue[๐Ÿš€Model Deployment]"):
56
- display_content("Model Deployment")
57
- if st.button(":blue[๐Ÿ“ Monitoring]"):
58
- display_content("Monitoring")
 
1
  import streamlit as st
2
 
3
+ # Initialize session state for page navigation if not already initialized
4
+ if 'page' not in st.session_state:
5
+ st.session_state.page = "home" # Default page is "home"
6
+
7
+ # Home Page
8
+ if st.session_state.page == "home":
9
+ st.title(":red[Lifecycle of a Machine Learning Project]")
10
+ st.markdown("Click on a stage to learn more about it.")
11
+
12
+ # Button for Data Collection (Redirection happens here)
13
+ if st.button(":blue[๐Ÿ“Š Data Collection]"):
14
+ st.session_state.page = "data_collection" # Redirect to 'data_collection' page
15
+
16
+ # Buttons for other stages (No redirection for these)
17
+ if st.button(":blue[๐ŸŒŸ Problem Statement]"):
18
  st.markdown("### Problem Statement\nIdentify the problem you want to solve and set clear objectives and success criteria.")
19
+ if st.button(":blue[๐Ÿ› ๏ธ Simple EDA]"):
20
+ st.markdown("### Simple EDA\nPerform exploratory data analysis to understand data distributions and relationships.")
21
+ if st.button(":blue[Data Pre-Processing]"):
22
+ st.markdown("### Data Pre-Processing\nHere we convert raw data into cleaned data.")
23
+ if st.button(":blue[๐Ÿ“ˆ Exploratory Data Analysis (EDA)]"):
 
 
 
 
24
  st.markdown("### Exploratory Data Analysis (EDA)\nVisualize and analyze the data to understand its distributions and relationships.")
25
+ if st.button(":blue[๐Ÿ‹๏ธ Feature Engineering]"):
26
  st.markdown("### Feature Engineering\nHere we can create our own new features.")
27
+ if st.button(":blue[Model Training]"):
28
  st.markdown("### Model Training\nTrain the model using the training data and optimize its parameters.")
29
+ if st.button(":blue[๐Ÿ”ง Model Testing]"):
30
  st.markdown("### Model Testing\nAssess the model's performance using various metrics and cross-validation techniques.")
31
+ if st.button(":blue[๐Ÿš€ Model Deployment]"):
32
  st.markdown("### Model Deployment\nIntegrate the trained model into a production environment and monitor its performance.")
33
+ if st.button(":blue[๐Ÿ“ Monitoring]"):
34
  st.markdown("### Monitoring\nPeriodically retrain the model with new data and update features as needed.")
35
 
36
+ # Data Collection Page (Triggered when "Data Collection" is clicked)
37
+ elif st.session_state.page == "data_collection":
38
+ st.title("Data Collection")
39
+ st.markdown("### Data Collection\nThis page discusses the process of Data Collection.")
40
+ st.markdown("Types of Data: Structured, Unstructured, Semi-Structured")
41
+
42
+ # Add more content for data collection here
43
 
44
+ # Button to go back to home page
45
+ if st.button("Back to Home"):
46
+ st.session_state.page = "home" # Go back to the home page