ricklon commited on
Commit
f5990c6
·
verified ·
1 Parent(s): 4aee7eb

Update pages/page2.py

Browse files
Files changed (1) hide show
  1. pages/page2.py +9 -10
pages/page2.py CHANGED
@@ -1,15 +1,14 @@
1
  import streamlit as st
2
 
3
- def app():
4
- st.title('Page 2')
5
-
6
- # Displaying shared data from Page 1
7
- if 'shared_data' in st.session_state:
8
- st.write(f"Data from Page 1: {st.session_state['shared_data']}")
9
-
10
- # Button to go back to Page 1
11
- if st.button('Back to Page 1'):
12
- st.switch_page('page1')
13
 
14
  st.write("Welcome to Page 1!")
15
 
 
1
  import streamlit as st
2
 
3
+ st.title('Page 2')
4
+
5
+ # Displaying shared data from Page 1
6
+ if 'shared_data' in st.session_state:
7
+ st.write(f"Data from Page 1: {st.session_state['shared_data']}")
8
+
9
+ # Button to go back to Page 1
10
+ if st.button('Back to Page 1'):
11
+ st.switch_page('page1')
 
12
 
13
  st.write("Welcome to Page 1!")
14