Spaces:
Runtime error
Runtime error
Update 01_π _home.py
Browse files- 01_π _home.py +9 -0
01_π _home.py
CHANGED
|
@@ -13,6 +13,15 @@ if 'form_fields' not in st.session_state:
|
|
| 13 |
}
|
| 14 |
st.session_state['progress'] = _progress
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
st.sidebar.progress(st.session_state['progress']())
|
| 17 |
|
|
|
|
|
|
|
| 18 |
st.json(st.session_state['form_fields'])
|
|
|
|
| 13 |
}
|
| 14 |
st.session_state['progress'] = _progress
|
| 15 |
|
| 16 |
+
st.sidebar.title("Test Multi-Page App")
|
| 17 |
+
st.sidebar.markdown("""With streamlit 1.10.0, you can create [multipage apps](https://docs.streamlit.io/library/get-started/multipage-apps/create-a-multipage-app) right out of the box! π
|
| 18 |
+
|
| 19 |
+
This simple demo uses that feature + Streamlit's [session state](https://docs.streamlit.io/library/advanced-features/session-state) to keep track of form fields across multiple pages, and report the global progress of filling out all the forms.
|
| 20 |
+
|
| 21 |
+
This sort of workflow used to take a lot more effort, so it's cool to see it working a bit smoother now. π€
|
| 22 |
+
""")
|
| 23 |
st.sidebar.progress(st.session_state['progress']())
|
| 24 |
|
| 25 |
+
"Here's the dict containing all the form field values for the current session:"
|
| 26 |
+
|
| 27 |
st.json(st.session_state['form_fields'])
|