An intelligent multi-modal educational platform powered by Google Generative AI (Gemini) and built with Python & Streamlit. It transforms complex study materials (PDF documents, slides, images, and raw text) into comprehensive narrative summaries, automated MCQ quizzes with detailed explanations, and active-recall flashcards.
Python Version Framework AI Model Architecture License
- π Narrative Multi-modal Synthesis: Ingests PDFs, images, and text to generate structured summaries highlighting Exam Hotspots and intuitive analogies.
- π Automated Quiz & Exam Simulation: Dynamically creates 10-question MCQ quizzes across customizable difficulty levels with instant grading and referenced rationales.
- β‘ Active Recall Flashcards: Automatically extracts technical terms and definitions into bite-sized revision flashcards.
- π‘οΈ Production-Grade Resilience:
- Exponential Backoff: Configured with
tenacityretry logic to gracefully handle rate limits (429) and transient network errors. - Strict JSON Schema Enforcement: Robust regex parsing and validation ensure 100% structured JSON integrity without UI crash.
- Exponential Backoff: Configured with
- π¨ Glassmorphism Dark UI: Clean, modern responsive interface crafted with custom CSS styling.
graph TD
A[Input: PDF / Image / Text] --> B[SmartStudy Engine]
B --> C{Task Type}
C -->|Summary| D[Narrative Prompt + Hotspots]
C -->|Quiz| E[MCQ Prompt + Strict JSON Schema]
C -->|Flashcards| F[Concept Extraction Prompt]
D --> G[Gemini API with Tenacity Retry]
E --> G
F --> G
G --> H[JSON Schema Validation & Fallback]
H --> I[Streamlit Glassmorphism UI]
git clone https://github.com/Kong19565/SmartStudy_AI.git
cd SmartStudy_AIpython -m venv venv # On Windows: venv\Scripts\activate # On Linux/macOS: source venv/bin/activate
pip install -r requirements.txt
Create a .env file in the project root:
GEMINI_API_KEY="your_actual_gemini_api_key"
streamlit run app.py
- Core Engine: Python 3.10+, Google Generative AI SDK (
google-generativeai) - Frontend / Dashboard: Streamlit, Custom Glassmorphism CSS
- Resilience & Validation: Tenacity (Retry & Backoff), Pydantic / JSON schema parsers
- Document Processing: PyPDF2, Pillow (PIL)
Apisak Kongphakdee (Kong)
- GitHub: @Kong19565
- Location: Bangkok, Thailand