File size: 1,373 Bytes
911d489
cb171ce
911d489
f1b2eb8
 
 
 
911d489
f1b2eb8
 
cb171ce
911d489
f1b2eb8
 
 
 
 
 
cb171ce
f1b2eb8
 
 
 
 
cb171ce
 
f1b2eb8
 
 
 
cb171ce
 
 
 
 
 
f1b2eb8
 
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
39
import streamlit as st
from start_page import main as start_page

# Import other pages. Assume each has a main function to run the page.
from pages.data_source_config import main as data_source_config
from pages.data_loading import main as data_loading
# Add imports for other pages similarly...

# Initialize session state for page navigation if not already set
if 'page' not in st.session_state:
    st.session_state.page = 'start_page'

# Define a function to change the page
def change_page(page_name):
    st.session_state.page = page_name

# Page selection (could also use st.sidebar for these)
st.sidebar.title("Navigation")
st.sidebar.button("Start Page", on_click=change_page, args=('start_page',))
st.sidebar.button("Data Source Configuration", on_click=change_page, args=('data_source_config',))
st.sidebar.button("Data Loading", on_click=change_page, args=('data_loading',))
# Add buttons for other pages similarly...

# Page dispatch
if st.session_state.page == 'start_page':
    start_page()
elif st.session_state.page == 'data_source_config':
    data_source_config()
elif st.session_state.page == 'data_loading':
    data_loading()
elif st.session_state.page == 'model_selection':
    model_selection()
elif st.session_state.page == 'processing_embedding':
    processing_embedding()
    


# The above could be optimized by mapping page names to functions