Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,32 +1,8 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
-
#
|
6 |
-
|
7 |
-
|
8 |
-
import about
|
9 |
-
import contact
|
10 |
-
|
11 |
-
# Set up the page configuration
|
12 |
-
|
13 |
-
|
14 |
-
# Set up navigation logic
|
15 |
-
def load_page(page):
|
16 |
-
if page == "Home":
|
17 |
-
home.show()
|
18 |
-
elif page == "Predictions":
|
19 |
-
prediction.show()
|
20 |
-
elif page == "About":
|
21 |
-
about.show()
|
22 |
-
elif page == "Contact":
|
23 |
-
contact.show()
|
24 |
-
else:
|
25 |
-
st.error("Page not found")
|
26 |
-
|
27 |
-
# Navigation menu
|
28 |
-
st.sidebar.title("Navigation")
|
29 |
-
page = st.sidebar.radio("Select a Page", ["Home", "Predictions", "About", "Contact"])
|
30 |
-
|
31 |
-
# Call the function to display the selected page
|
32 |
-
load_page(page)
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
# ✅ Must be the first Streamlit command
|
4 |
+
st.set_page_config(page_title="TransPolymer", layout="wide", page_icon="🧪")
|
5 |
|
6 |
+
# Now you can do other Streamlit things
|
7 |
+
st.title("Welcome to TransPolymer")
|
8 |
+
# ... rest of your routing logic or page switcher
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|