Chaptive / app.py
Jing997's picture
change app name
497bf08
raw
history blame contribute delete
849 Bytes
# Main entry point of the Streamlit application
import streamlit as st
import sys
from pathlib import Path
APP_DIR = Path(__file__).resolve().parent
STREAMLIT_SRC = APP_DIR / "src"
if str(STREAMLIT_SRC) not in sys.path:
sys.path.append(str(STREAMLIT_SRC))
from pages import about_page, contact_page, home_page
def main():
st.set_page_config(
page_title="Chaptive (YouTube Tutor Chatbot)",
page_icon="πŸ“š",
layout="wide",
initial_sidebar_state="expanded",
)
st.sidebar.title("Navigation")
# Sidebar navigation
pages = {
"Home": home_page,
"About": about_page,
"Contact": contact_page,
}
selection = st.sidebar.radio("Go to", list(pages.keys()))
# Render the selected page
pages[selection]()
if __name__ == "__main__":
main()