verifiability / utils.py
prakharg24's picture
Create utils.py
3a29afc verified
raw
history blame
297 Bytes
import streamlit as st
def go_to(page_name, from_callback=False):
"""
Updates the session_state page and optionally triggers a rerun.
- from_callback=True if called inside an on_click callback
"""
st.session_state.page = page_name
if not from_callback:
st.rerun()