GB-GB / app.py
Esben922's picture
Update app.py
d205e74 verified
raw
history blame
656 Bytes
import streamlit as st
# Define the menu structure with labels and their associated script names
menu = {
"GB-GB": "GB-GB.py",
"BG": "BG.py",
"MultiL": "MultiL.py",
}
# Sidebar title
st.sidebar.title("Navigation")
# Initialize session state for selected script
if "selected_script" not in st.session_state:
st.session_state.selected_script = "GB-GB.py" # Default script
# Sidebar menu implementation
for label, script in menu.items():
if st.sidebar.button(label):
st.session_state.selected_script = script
# Execute the selected script
selected_script = st.session_state.selected_script
exec(open(selected_script).read())