georad commited on
Commit
057e688
·
verified ·
1 Parent(s): 25be930

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +47 -9
app.py CHANGED
@@ -1,14 +1,52 @@
1
  import streamlit as st
2
- from streamlit_option_menu import option_menu
3
  #for k, v in st.session_state.items():
4
  # st.session_state[k] = v
5
 
6
- with st.sidebar:
7
- selected=option_menu(
8
- menu_title = "SBS Mapper",
9
- options = ["Chapters for selection", "DEMO for text entry", "DEMO for file upload (coming)", "About the app"],
10
- icons = ["book", "keyboard", "upload", "info-circle"],
11
- menu_icon = "receipt",
12
- default_index = 0,
13
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  st.sidebar.text("Project by JA-RAD")
 
1
  import streamlit as st
 
2
  #for k, v in st.session_state.items():
3
  # st.session_state[k] = v
4
 
5
+ # --- SHARED ON ALL PAGES ---
6
+ #st.logo(image=":material/medical_information:")
7
+ #st.logo(image="images/medical_information_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.png")
8
+ st.logo(image="images/menu_book_60dp_75FBFD.png")
9
+ st.sidebar.title("SBS Codes V2.0 Mapper")
10
+
11
+ # --- PAGE SETUP ---
12
+ start_page = st.Page(
13
+ page="pages/chapter_index.py",
14
+ title="Chapters for selection",
15
+ icon=":material/home:",
16
+ default=True,)
17
+
18
+ type_text_page = st.Page(
19
+ page="pages/type_text.py",
20
+ title="DEMO for text entry",
21
+ icon=":material/keyboard:",
22
+ default=False,)
23
+
24
+ upload_file_page = st.Page(
25
+ page="pages/upload_file.py",
26
+ title="DEMO for file upload (work in progress)",
27
+ icon=":material/file_upload:",
28
+ default=False,)
29
+
30
+ about_page = st.Page(
31
+ page="pages/about.py",
32
+ title="About the app",
33
+ icon=":material/info:",
34
+ default=False)
35
+
36
+ #PAGES = {
37
+ # "Chapter Index": "pages/chapter_index.py" ,
38
+ # "DEMO type_text": "pages/type_text.py",
39
+ # "DEMO upload file (not yet active)": "pages/upload_file.py",
40
+ # "About": "pages/about.py",
41
+ #}
42
+
43
+ #selection = st.sidebar.radio("Pages", list(PAGES.keys()))
44
+ #selection = st.sidebar.radio("Pages", [start_page, type_text_page, upload_file_page, about_page])
45
+ #page = PAGES[selection]
46
+
47
+ # --- NAVIGATION SETUP ---
48
+ pg = st.navigation(pages=[start_page, type_text_page, upload_file_page, about_page]) # WITHOUT SECTIONS
49
+ #pg = st.navigation({"Chapter_Index": [start_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
50
+ pg.run()
51
+
52
  st.sidebar.text("Project by JA-RAD")