File size: 1,418 Bytes
63eaae0
 
c72a9c6
132ef4f
d5c5547
63eaae0
d5c5547
63eaae0
d5c5547
63eaae0
 
d5c5547
 
96649cd
ca731b8
96649cd
63eaae0
 
 
983f9c9
323ae54
63eaae0
 
 
beff7a7
63eaae0
f7863b2
63eaae0
 
 
 
 
 
 
 
 
 
 
 
 
132ef4f
 
63eaae0
983f9c9
323ae54
63eaae0
 
 
959e487
63eaae0
f7863b2
7236447
63eaae0
 
 
 
 
 
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59


import streamlit as st
from pathlib import Path

# Configure page settings
st.set_page_config(
    page_title="Social Media Addiction Insights",
    page_icon="📊",
    layout="wide",
    initial_sidebar_state="expanded"
)

logo_path = "download.jpg"  # Replace with the path to your logo image
st.sidebar.image(logo_path, use_container_width =True)

# Sidebar navigation
st.sidebar.title("Navigation")
page = st.sidebar.radio("Go to", [
    "HomePage",
    "User Demographics",
    "Platform Usage Patterns",
    "Video Consumption Insights",
    "Socioeconomic Analysis",
    "Addiction Level Distribution",
    "Activity and Connection Type",
    "Personalize Assistance"
])
st.markdown(
        """
    <style>
        [data-testid="stSidebarNav"] {
            display: none;
        }

    </style>
    """,
        unsafe_allow_html=True,
    )

# Dynamically load pages
pages_dir = Path("pages")
page_files = {
    "HomePage": "HomePage.py",
    "User Demographics": "overview.py",
    "Platform Usage Patterns": "platform_usage.py",
    "Video Consumption Insights": "video_insights.py",
    "Socioeconomic Analysis": "socioeconomic.py",
    "Addiction Level Distribution": "addiction.py",
    "Activity and Connection Type": "activity.py",
    "Personalize Assistance": "chatbot.py"
    
}

if page in page_files:
    exec(open(pages_dir / page_files[page]).read())
else:
    st.error("Page not found!")