File size: 849 Bytes
d55322d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
497bf08
d55322d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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()