Spaces:
Running
Running
import streamlit as st | |
# Import your page files | |
import home | |
import prediction | |
import about | |
import contact | |
# Set up the page configuration | |
st.set_page_config(page_title="TransPolymer", layout="wide") | |
# Set up navigation logic | |
def load_page(page): | |
if page == "Home": | |
home.show() | |
elif page == "Predictions": | |
prediction.show() | |
elif page == "About": | |
about.show() | |
elif page == "Contact": | |
contact.show() | |
else: | |
st.error("Page not found") | |
# Navigation menu | |
st.sidebar.title("Navigation") | |
page = st.sidebar.radio("Select a Page", ["Home", "Predictions", "About", "Contact"]) | |
# Call the function to display the selected page | |
load_page(page) | |