Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,31 +1,21 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
def load_page(page):
|
9 |
-
if page == "Home":
|
10 |
-
home.show() # Call home.py's show() function
|
11 |
-
elif page == "Predictions":
|
12 |
-
prediction.show() # Call predictions.py's show() function
|
13 |
-
elif page == "About":
|
14 |
-
about.show() # Call about.py's show() function
|
15 |
-
elif page == "Contact":
|
16 |
-
contact.show() # Call contact.py's show() function
|
17 |
-
else:
|
18 |
-
st.error("Page not found")
|
19 |
|
20 |
-
#
|
21 |
-
st.sidebar.title("Navigation")
|
22 |
-
page = st.sidebar.radio("
|
23 |
|
24 |
-
#
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from home import show_home
|
3 |
+
from prediction import show_prediction
|
4 |
+
from contact import show_contact
|
5 |
+
from about import show_about
|
6 |
|
7 |
+
st.set_page_config(page_title="TransPolymer", layout="wide", page_icon="🧪")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
# Sidebar for navigation
|
10 |
+
st.sidebar.title("🔗 Navigation")
|
11 |
+
page = st.sidebar.radio("Go to", ["Home", "Prediction", "Contact Us", "About"])
|
12 |
|
13 |
+
# Routing logic
|
14 |
+
if page == "Home":
|
15 |
+
show_home()
|
16 |
+
elif page == "Prediction":
|
17 |
+
show_prediction()
|
18 |
+
elif page == "Contact Us":
|
19 |
+
show_contact()
|
20 |
+
elif page == "About":
|
21 |
+
show_about()
|