sbsmapper / app.py
georad's picture
Update app.py
2a9735b verified
raw
history blame
1.8 kB
import streamlit as st
for k, v in st.session_state.items():
st.session_state[k] = v
# --- SHARED ON ALL PAGES ---
#st.logo(image=":material/medical_information:")
#st.logo(image="images/medical_information_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.png")
st.logo(image="images/menu_book_60dp_75FBFD.png")
st.sidebar.title("SBS V2.0 Mapper")
st.sidebar.text("Project by JA-RAD")
# --- PAGE SETUP ---
start_page = st.Page(
page="pages/chapter_index.py",
title="Chapters for selection",
icon=":material/home:",
default=True,)
type_text_page = st.Page(
page="pages/type_text_v7.py",
title="DEMO for text entry",
icon=":material/keyboard:",
default=False,)
demo_type_text_page = st.Page(
page="pages/demo_type_text.py",
title="DEMO for text entry",
icon=":material/keyboard:",
default=False,)
upload_file_page = st.Page(
page="pages/upload_file.py",
title="DEMO for file upload (work in progress)",
icon=":material/file_upload:",
default=False,)
about_page = st.Page(
page="pages/about.py",
title="About the app",
icon=":material/info:",
default=False)
#PAGES = {
# "Chapter Index": "pages/chapter_index.py" ,
# "DEMO type_text": "pages/type_text.py",
# "DEMO upload file (not yet active)": "pages/upload_file.py",
# "About": "pages/about.py",
#}
#selection = st.sidebar.radio("Pages", list(PAGES.keys()))
#selection = st.sidebar.radio("Pages", [start_page, type_text_page, upload_file_page, about_page])
#page = PAGES[selection]
# --- NAVIGATION SETUP ---
pg = st.navigation(pages=[type_text_page, upload_file_page, about_page]) # WITHOUT SECTIONS
#pg = st.navigation({"Chapter_Index": [start_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
pg.run()