Skip to content
/ SGPA Public

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/SGPA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“˜ SGPA β€” Study Guide & Personal Assistant

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

SGPA Mobile Demo


Recent updates (v1.2.0):

  • Explainer now suggests simple sketchable diagrams for visual understanding.
  • Summarizer handles very short or scanned PDFs more safely with clearer warnings.
  • Added lightweight, privacy-friendly usage analytics (anonymous sessions and mode usage).

βš™οΈ 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, with guards for very short/empty text)
  • πŸ“Š Lightweight usage logging for sessions and mode usage (CSV-based, privacy-friendly)
  • πŸ’¬ 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

SGPA/
β”œβ”€β”€ 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

SGPA Workflow SGPA 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”).
    SGPA returns a simple, exam-oriented explanation, plus an idea for a quick diagram you can sketch.

  • Summarizer:
    Upload a PDF or paste notes.
    SGPA returns an exam-ready summary with headings, bullets, and practice questions.

  • 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 SGPA.
  • If you deploy this project publicly or create a derivative version:
    • Keep the existing license file.
    • Credit β€œSGPA 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.


πŸ‘¨β€πŸ’» 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