Spaces:
Runtime error
Runtime error
File size: 647 Bytes
5e55a06 f3bfb18 5e55a06 f3bfb18 5e55a06 f3bfb18 5e55a06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import streamlit as st
from streamlit_extras.switch_page_button import switch_page
import os
# pages = ["Overall"]
# files = os.listdir('.\pages')
# for name in files:
# name = name.split()[1].replace('.py', '').replace('_', ' ')
# pages.append(name)
pages = [
"Overall",
"Category", "Genre", "DLC Counts", "Price", "Age Restriction",
"Settings", "OS", "Publisher", "Developer",
]
def st_page_selectbox(current_page):
current_index = pages.index(current_page)
selected_page = st.selectbox("Select a category", pages, index=current_index)
if selected_page != current_page:
switch_page(selected_page)
|