File size: 764 Bytes
3f8442f
 
 
 
 
 
3fad108
3da2375
752f1d9
3da2375
752f1d9
 
 
3da2375
074555f
 
 
3da2375
074555f
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import streamlit as st

# Optionally, set the initial configuration of the app or display a welcome message
st.set_page_config(page_title="My Multi-Page App", page_icon=":rocket:", layout="wide")

# The actual navigation and page content are handled by Streamlit's automatic page discovery
st.write("App!")
st.write("Testing multipage")

st.write("If Data from Page1:")
# Displaying shared data from Page 1
if 'shared_data' in st.session_state:
    st.write(f"Data from Page 1: {st.session_state['shared_data']}")

# Button to go back to Page 1
if st.button('Back to Page 1'):
    st.switch_page('pages/page1.py')

# Button to navigate to Page 2 and pass data
if st.button('Go to Page 2 with Data'):
    # Navigating to Page 2
    st.switch_page('pages/page2.py')