|
|
|
|
|
|
|
|
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") |
|
|
|
|
|
|
|
|
pages = { |
|
|
"Home": home_page, |
|
|
"About": about_page, |
|
|
"Contact": contact_page, |
|
|
} |
|
|
|
|
|
selection = st.sidebar.radio("Go to", list(pages.keys())) |
|
|
|
|
|
|
|
|
pages[selection]() |
|
|
|
|
|
if __name__ == "__main__": |
|
|
main() |