Gyan.AI / app.py
cryogenic22's picture
Update app.py
b3e87f7 verified
import streamlit as st
from src.components.ai_tutor import AITutor
from src.components.code_playground import CodePlayground
from src.components.learning_paths import LearningPaths
from src.components.sidebar import Sidebar
from src.utils.session import initialize_session_state
from src.utils.ui import apply_custom_css # Assuming apply_custom_css is still needed
def main():
# Initialize app
# Removed set_page_config for now
apply_custom_css()
initialize_session_state()
# Initialize components
ai_tutor = AITutor()
learning_paths = LearningPaths()
# Display sidebar
Sidebar.display()
# Title
st.title("πŸ€– Guru.AI - Your AI Mentor")
# Welcome message for new users
if 'username' not in st.session_state:
st.info("πŸ‘‹ Welcome to Guru.AI! Please enter your nickname to start learning.")
return
# Main content tabs
tab1, tab2, tab3 = st.tabs(["πŸ“š Learning Paths", "πŸ€– AI Tutor", "πŸ’» Code Playground"])
with tab1:
learning_paths.display()
with tab2:
ai_tutor.display_chat_interface()
with tab3:
CodePlayground.display()
if __name__ == "__main__":
main()