File size: 4,540 Bytes
33dcba3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import streamlit as st
from pages import (
    chatbot, notes_generation, exam_preparation, mnemonics_generation,
    study_roadmap, interview_preparation, ai_buddy, meditation,
    mind_palace, sherlock_observation
)

# Custom CSS for improved styling
def local_css(file_name):
    with open(file_name, "r") as f:
        st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)

# Load custom CSS
local_css("style.css")

st.set_page_config(
    page_title="S.H.E.R.L.O.C.K.",
    page_icon="πŸ•΅οΈ",
    layout="wide",
    initial_sidebar_state="expanded"
)

# Define the pages with icons
PAGES = {
    "Web RAG Powered Chatbot": {"icon": "πŸ’¬", "function": chatbot},
    "Notes Generation": {"icon": "πŸ“", "function": notes_generation},
    "Exam Preparation": {"icon": "πŸ“š", "function": exam_preparation},
    "Mnemonics Generation": {"icon": "🧠", "function": mnemonics_generation},
    "Study Roadmap": {"icon": "πŸ—ΊοΈ", "function": study_roadmap},
    "Interview Preparation": {"icon": "🎀", "function": interview_preparation},
    "AI Buddy": {"icon": "πŸ€–", "function": ai_buddy},
    "Meditation & Mindfulness": {"icon": "🧘", "function": meditation},
    "Mind Palace Builder": {"icon": "πŸ›οΈ", "function": mind_palace},
    "Sherlock Style Observation": {"icon": "πŸ”", "function": sherlock_observation}
}

def main():
    st.sidebar.image("logo.png", use_column_width=True)
    st.sidebar.title("S.H.E.R.L.O.C.K. πŸ•΅οΈ")
    st.sidebar.markdown("*Study Helper & Educational Resource for Learning & Observational Knowledge*")
    
    st.markdown("""

            <style>

                body {

            font-family: 'Roboto', sans-serif;

            background-color: #f0f2f6;

            }



            .stButton button {

                background-color: #0e1117;

                color: white;

                border-radius: 20px;

                padding: 10px 20px;

                font-weight: bold;

                transition: all 0.3s ease;

            }



            .stButton button:hover {

                background-color: #2e7d32;

                box-shadow: 0 4px 8px rgba(0,0,0,0.1);

            }



            .sidebar .sidebar-content {

                background-color: #0e1117;

                color: white;

            }



            h1, h2, h3 {

                color: #1e3a8a;

            }



            .stRadio > label {

                font-weight: bold;

                color: #333;

            }

            </style>

                """)
    
    selection = st.sidebar.radio(
        "Navigate",
        list(PAGES.keys()),
        format_func=lambda x: f"{PAGES[x]['icon']} {x}"
    )
    
    st.sidebar.markdown("---")
    st.sidebar.info(
        "This app is part of the S.H.E.R.L.O.C.K. project. "
        "For more information, visit [our website](https://example.com)."
    )
    st.sidebar.text("Version 1.0")
    
    # Main content area
    st.title(f"{PAGES[selection]['icon']} {selection}")
    
    # Display a brief description of the selected feature
    feature_descriptions = {
        "Web RAG Powered Chatbot": "Engage with our AI-powered chatbot for interactive learning and web-based information retrieval.",
        "Notes Generation": "Transform complex documents into concise, easy-to-understand notes.",
        "Exam Preparation": "Generate custom question papers and practice tests to ace your exams.",
        "Mnemonics Generation": "Create personalized memory aids to boost your retention of key information.",
        "Study Roadmap": "Get a tailored learning path to achieve your educational goals efficiently.",
        "Interview Preparation": "Simulate interview scenarios and receive feedback to improve your performance.",
        "AI Buddy": "Chat with a personalized AI companion for support and therapy sessions.",
        "Meditation & Mindfulness": "Access resources for relaxation, focus, and mental well-being.",
        "Mind Palace Builder": "Construct mental frameworks to enhance your memory and learning capabilities.",
        "Sherlock Style Observation": "Develop critical thinking skills and learn to approach subjects from unique perspectives."
    }
    
    st.markdown(f"*{feature_descriptions[selection]}*")
    st.markdown("---")

    # Load the selected page
    with st.spinner(f"Loading {selection} ..."):
        PAGES[selection]["function"].main()

if __name__ == "__main__":
    main()