Spaces:
Runtime error
Runtime error
Create 1_page_1.py
Browse files- pages/1_page_1.py +15 -0
pages/1_page_1.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
form_fields = st.session_state['form_fields']
|
| 4 |
+
form_fields['page_1_a'] = st.text_input("Enter something", form_fields['page_1_a'] or "")
|
| 5 |
+
form_fields['page_1_b'] = st.text_input("Enter something else", form_fields['page_1_b'] or "")
|
| 6 |
+
|
| 7 |
+
count = 0
|
| 8 |
+
if form_fields['page_1_a'].strip():
|
| 9 |
+
count += 1
|
| 10 |
+
if form_fields['page_1_b'].strip():
|
| 11 |
+
count += 1
|
| 12 |
+
|
| 13 |
+
f"Count for this page is {count}"
|
| 14 |
+
|
| 15 |
+
st.sidebar.progress(st.session_state['progress']())
|