File tree Expand file tree Collapse file tree 1 file changed +46
-18
lines changed Expand file tree Collapse file tree 1 file changed +46
-18
lines changed Original file line number Diff line number Diff line change 1
1
import streamlit as st
2
2
3
- # --- Page Setup ---
3
+ # # --- Page Setup ---
4
4
5
- about_Me = st .Page (
6
- page = 'about_me.py' ,
7
- title = "About Me" ,
8
- )
5
+ # about_Me = st.Page(
6
+ # page = 'about_me.py',
7
+ # title = "About Me",
8
+ # )
9
9
10
- project_1_page = st .Page (
11
- page = 'SpecNec_executable_streamlit.py' ,
12
- title = "Spec NEC" ,
13
- default = True ,
14
- )
10
+ # project_1_page = st.Page(
11
+ # page = 'SpecNec_executable_streamlit.py',
12
+ # title = "Spec NEC",
13
+ # default= True,
14
+ # )
15
15
16
- ## --- Navigation
16
+ # # # --- Navigation
17
17
18
- pg = st .navigation (
19
- {
20
- "info" : [about_Me ],
21
- "Basic Apps" : [project_1_page ],
22
- }
23
- )
18
+ # pg = st.navigation(
19
+ # {
20
+ # "info": [about_Me],
21
+ # "Basic Apps": [project_1_page],
22
+ # }
23
+ # )
24
+
25
+ # pg.run()
26
+
27
+ import streamlit as st
28
+
29
+ # Define a simple navigation function
30
+ def main ():
31
+ st .sidebar .title ("Navigation" )
32
+ page = st .sidebar .radio ("Go to" , ["About Me" , "Spec NEC" ])
33
+
34
+ if page == "About Me" :
35
+ about_me ()
36
+ elif page == "Spec NEC" :
37
+ spec_nec ()
38
+
39
+ def about_me ():
40
+ st .title ("About Me" )
41
+ runpy ('about_me.py' )
42
+
43
+ def spec_nec ():
44
+ st .title ("Spec NEC" )
45
+ runpy ('SpecNec_executable_streamlit.py' )
46
+
47
+ def runpy (filepath ):
48
+ with open (filepath ) as file :
49
+ exec (file .read (), globals ())
50
+
51
+ if __name__ == "__main__" :
52
+ main ()
24
53
25
- pg .run ()
You can’t perform that action at this time.
0 commit comments