This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
from persist import persist, load_widget_state | |
def main(): | |
if "page" not in st.session_state: | |
# Initialize session state. | |
st.session_state.update({ | |
# Default page. | |
"page": "home", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit.ReportThread as ReportThread | |
from streamlit.server.Server import Server | |
def get_session_id(): | |
# Hack to get the session object from Streamlit. | |
ctx = ReportThread.get_report_ctx() | |
this_session = None |