-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
38 lines (32 loc) · 1.27 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# main.py
import streamlit as st
from regression_tool import main as regression_tool
from data_preprocessing import main as data_preprocessing
from make_report import make_report
def main():
# Initialize session state if not already initialized
if "page" not in st.session_state:
st.session_state.page = "main"
if st.session_state.page == "main":
main_page()
elif st.session_state.page == "regression_tool":
regression_tool()
elif st.session_state.page == "data_preprocessing":
data_preprocessing()
elif st.session_state.page == 'make_report':
make_report()
def main_page():
st.title("Main Page")
# Navigation links
page = st.sidebar.selectbox("Choose a page", ["Home", "Regression Analysis Tool", "Data Preprocessing"])
if page == "Home":
st.write("Welcome to the Main Page")
st.write("Please select a page from the sidebar to get started.")
elif page == "Regression Analysis Tool":
st.write("Redirecting to Regression Analysis Tool...")
st.session_state.page = "regression_tool"
elif page == "Data Preprocessing":
st.write("Redirecting to Data Preprocessing Page...")
st.session_state.page = "data_preprocessing"
if __name__ == "__main__":
main()