|
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
|
|
)
|
|
|
|
|
|
def local_css(file_name):
|
|
with open(file_name, "r") as f:
|
|
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
|
|
|
|
|
|
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"
|
|
)
|
|
|
|
|
|
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")
|
|
|
|
|
|
st.title(f"{PAGES[selection]['icon']} {selection}")
|
|
|
|
|
|
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("---")
|
|
|
|
|
|
with st.spinner(f"Loading {selection} ..."):
|
|
PAGES[selection]["function"].main()
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|