Students often struggle to grasp difficult topics or summarize lengthy notes.
Study Buddy is an AI-powered web app that acts as a personal academic assistant, capable of:
- 🧩 Explaining complex concepts in simple terms
- 📄 Summarizing notes or uploaded PDFs
- ❓ Generating quizzes, solving exam questions, and evaluating answers
Combines Streamlit for UI and Gemini 2.5 Flash API for fast, intelligent AI responses — all in a clean chat-based interface.
A lightweight Streamlit frontend interacts with Google Gemini 2.5 Flash backend via secure API calls.
All secrets managed safely via .env and st.secrets.
| Mode | Function | Example |
|---|---|---|
| 🧠 Explainer | Simplifies academic concepts | “Explain Deadlock in OS” |
| 📄 Summarizer | Condenses notes or PDFs | Upload 20-page PDF → summary |
| 🧩 Quizzer | Quiz generator, solver, evaluator (multi-mode workflow) | MCQs, solve/evaluate Q&As |
Other Features:
- 📂 PDF upload (PyPDF2 extraction)
- 💬 Real-time chat interface
- 🔄 New chat/reset option
- ☁️ Deployed on Streamlit Cloud
- 📝 Generate Questions
Enter a topic/chapter/passage. Get a variety of questions (MCQ, T/F, fill-in, descriptive) — answers listed together as an answer key for self-testing. - 📖 Solve Questions
Paste your exam questions (optionally add word limits or marks). Get concise, exam-ready answers formatted per input. - ✅ Evaluate Answers
Submit questions and your answers (with '---' separator, or sequential prompts). Get detailed feedback, correction, and scoring.
StudyBuddy/
├── main.py
├── requirements.txt
├── assets/
│ └── PROBLEM STATEMENTS.pdf
├── components/
│ ├── chat_ui.py
│ ├── pdf_handler.py
│ └── sidebar.py
├── core/
│ ├── ai_utils.py
│ ├── explainer.py
│ ├── pdf_handler.py
│ ├── quizzer.py
│ └── summarizer.py
└── utils/
└── gemini_helper.py
©️🖼️ Diagram Credits: https://gitdiagram.com/
You can keep the PDF as the detailed reference and mirror a concise, in-README guide here.
- Open the deployed app:
https://sgpai-study-buddy.streamlit.app/ - Select a mode from the sidebar: Explainer, Summarizer, or Quizzer
- Provide input (topic, notes, PDF, or questions) in the main chat area
-
Explainer:
Type your concept or question (e.g., “Explain paging in OS for exams”).
Study Buddy returns a simple, exam-oriented explanation. -
Summarizer:
Upload a PDF or paste notes.
Choose the summary style (concise / detailed / bullet points) if enabled and generate a summary. -
Quizzer:
- Use “Generate Questions” for practice questions with an answer key.
- Use “Solve Questions” to get answers to your questions.
- Use “Evaluate Answers” to paste both question and your answer to receive feedback and scoring.
- Mention exam context (e.g., “for B.Tech 3rd sem OS viva”) for sharper responses.
- Use follow-up prompts in the same chat to refine or extend answers.
- Reset the chat using the “New Chat” / reset option before switching topics heavily.
For full details, screenshots, and troubleshooting, refer to the PDF:
| Category | Technologies |
|---|---|
| Frontend | Streamlit |
| Backend / AI | Google Gemini 2.5 Flash API |
| Language | Python |
| Libraries | PyPDF2, google-generativeai, streamlit, dotenv |
| Deployment | Streamlit Community Cloud |
| Security | .env + st.secrets key handling |
- 🎯 Simple, modern, and interactive chat-based UI
- 📑 Smart summarization, quiz generation, and answer evaluation
- ⚡ Fast, context-aware AI with Gemini 2.5 Flash
- 🧩 Smooth multi-mode workflow for study and revision
- 🗣️ Speech-to-text / text-to-speech interaction
- 🌐 Multi-language explanations
- 🧠 Flashcard & spaced-repetition support
- 👤 Memory-based user personalization
- ☁️ Drive/Notion integration for notes & sessions
🧩 “Integrating AI with Education — Making Learning Simpler, Smarter, and Accessible for All.”
- You are welcome to fork this repository to learn from it or build your own version of Study Buddy.
- If you deploy this project publicly or create a derivative version:
- Keep the existing license file.
- Credit “Study Buddy by Ammaar Ahmad Khan (GPA95)”.
- Include a link back to the original repo:
For contributions, please see CONTRIBUTING.md for guidelines on forking, branching, and opening pull requests.
Ammaar Ahmad Khan
- GitHub: @GPA95
🌟 If you find this repository useful, please give it a star! 🌟
