Skip to content

Commit c21c088

Browse files
authored
Update App_Spec.py
1 parent 0ed7aa5 commit c21c088

File tree

1 file changed

+46
-18
lines changed

1 file changed

+46
-18
lines changed

fun_SPEC_NEC/App_Spec.py

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,53 @@
11
import streamlit as st
22

3-
# --- Page Setup ---
3+
# # --- Page Setup ---
44

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+
# )
99

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+
# )
1515

16-
## --- Navigation
16+
# ## --- Navigation
1717

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()
2453

25-
pg.run()

0 commit comments

Comments
 (0)