Skip to content

AI-powered study assistant for personalized learning, exam revision, and concept mastery. Streamlit web app integrating Gemini 2.5 Flash API for instant explanations, PDF summarization, smart quiz generation, and automated answer evaluation—built for students and educators.

License

Notifications You must be signed in to change notification settings

GPA95/AI_StudyBuddy

Repository files navigation

📘 Study Buddy — AI-Powered Study Assistant

Streamlit Gemini API Python IBM SkillsBuild Status Version


YouTube Demo Live App HelpDoc


🧠 Project Overview

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.

Study Buddy Mobile Demo


⚙️ System Design

🏗️ Architecture

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.

🧩 Core Features

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

🧙‍♂️ Quizzer Mode — Three Powerful Sub-modes

  1. 📝 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.
  2. 📖 Solve Questions
    Paste your exam questions (optionally add word limits or marks). Get concise, exam-ready answers formatted per input.
  3. ✅ Evaluate Answers
    Submit questions and your answers (with '---' separator, or sequential prompts). Get detailed feedback, correction, and scoring.

🧱 Project Structure

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

🪜 Workflow

StudyBuddy Workflow StudyBuddy System Architecture ©️🖼️ Diagram Credits: https://gitdiagram.com/


📚 In-Repo User Guide (Quick Start)

You can keep the PDF as the detailed reference and mirror a concise, in-README guide here.

1️⃣ Getting Started

  • 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

2️⃣ Mode Usage

  • 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.

3️⃣ Tips for Best Results

  • 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: HelpDoc


💡 Tech Stack

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

🧾 Results

  • 🎯 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

🚀 Future Scope

  • 🗣️ 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.”


📜 Usage & Attribution

  • 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:

For contributions, please see CONTRIBUTING.md for guidelines on forking, branching, and opening pull requests.


👨‍💻 Author

Ammaar Ahmad Khan

🌟 If you find this repository useful, please give it a star! 🌟


About

AI-powered study assistant for personalized learning, exam revision, and concept mastery. Streamlit web app integrating Gemini 2.5 Flash API for instant explanations, PDF summarization, smart quiz generation, and automated answer evaluation—built for students and educators.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages