Skip to content

yashh1975/AI-Study-Pal

Repository files navigation

πŸŽ“ AI Study Pal: Smart Study Assistant

A context-aware web application that transforms raw study notes into smart summaries, personalized study plans, and interactive quizzes β€” automatically.

Built with Python Β· Flask Β· TensorFlow Β· Scikit-learn Β· NLTK


Platform Language Framework TensorFlow ML NLP Tests


πŸ“„ Problem Statement

Students studying AI and Data Science face a common challenge β€” there is simply too much material to absorb at once. Textbooks, lecture slides, research papers, and video tutorials pile up, leaving learners overwhelmed and underprepared.

AI Study Pal solves this by acting as an intelligent personal study assistant. Upload your notes as a PDF, tell it how many hours you have, and it automatically:

  • πŸ“ Extracts and summarises the most important concepts
  • πŸ“… Builds a realistic, time-bound study schedule
  • ❓ Generates a personalised quiz graded by difficulty
  • πŸ“„ Exports everything as a professional report

From raw notes to a complete study session β€” in seconds.


✨ Key Features

Feature Description
πŸ“Š Smart Text Summarisation LSTM Deep Learning model condenses uploaded notes into concise 50-word summaries
πŸ“… Personalised Study Plans Generates structured, timed study schedules based on available hours and detected topics
❓ Intelligent Quiz Generator Auto-generates 10 questions classified as Easy, Medium, or Hard using Logistic Regression
☁️ PDF Upload & Extraction Accepts student notes as PDF files and extracts clean text for processing
🎯 Topic Clustering K-Means clustering groups curriculum topics by semantic similarity for balanced coverage
πŸ”‘ Keyword Extraction NLTK-powered TF-IDF pipeline identifies and ranks the most important concepts
πŸ“„ Report Export Downloadable study plans and quiz results as professional CSV and PDF reports
πŸ§ͺ 100% Tested Full unit test suite covering all subject modules with 100% accuracy

πŸš€ Installation & Setup Guide

Follow these steps to get AI Study Pal running on your local machine:

Prerequisites

Make sure you have the following installed:

  • Python 3.10+
  • pip (Python package manager)
  • Git

Step 1: Clone the Repository

git clone https://github.com/yashh1975/ai-study-pal.git
cd ai-study-pal

Step 2: Create a Virtual Environment

python -m venv venv

# Activate on Windows
venv\Scripts\activate

# Activate on macOS / Linux
source venv/bin/activate

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Run the Application

python app.py

Step 5: Open in Browser

Navigate to:

http://127.0.0.1:5005/

Step 6: Use the App

  1. Enter a subject name (e.g., Machine Learning)
  2. Enter the number of study hours available
  3. Upload your PDF notes
  4. Click Generate β€” and get your summary, study plan, quiz, and report instantly!

πŸ—οΈ Design Architecture

The application follows a clean ML Pipeline + Flask Web Architecture, separating the data science layer from the web layer for modularity and scalability.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  WEB LAYER (Flask)                   β”‚
β”‚         Routes Β· PDF Upload Β· API Endpoints          β”‚
β”‚              Jinja2 Templates Β· REST                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚  Preprocessed Text
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               NLP PIPELINE (NLTK)                    β”‚
β”‚     Tokenisation Β· Stop Word Removal Β· TF-IDF        β”‚
β”‚            Keyword Extraction Β· Stemming             β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚              β”‚              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    LSTM     β”‚ β”‚  K-Means   β”‚ β”‚ Logistic Regression β”‚
β”‚ Summariser  β”‚ β”‚ Clustering β”‚ β”‚  Quiz Classifier    β”‚
β”‚ (TensorFlow)β”‚ β”‚(Scikit-learn)β”‚ β”‚  (Scikit-learn)   β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚  Results
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  OUTPUT LAYER                        β”‚
β”‚    Summary Β· Study Plan Β· Quiz Β· PDF/CSV Report      β”‚
β”‚              ReportLab PDF Generator                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Layer Technology Responsibility
Web Flask + Jinja2 Request handling, PDF upload, routing
NLP NLTK + TF-IDF Text preprocessing and keyword extraction
Deep Learning TensorFlow + Keras (LSTM) Automatic text summarisation
Machine Learning Scikit-learn Quiz classification & topic clustering
Report ReportLab + Pandas CSV and PDF export generation

🎨 Technology Stack

Category Technology
Language Python 3.10+
Web Framework Flask 2.x
Deep Learning TensorFlow 2.x + Keras (LSTM)
Machine Learning Scikit-learn (Logistic Regression, K-Means)
NLP NLTK (Tokenisation, TF-IDF, Keyword Extraction)
Data Handling Pandas
PDF Processing PyPDF2 + uuid (safe temp file handling)
Report Generation ReportLab
Model Serialisation .keras + .pkl formats

πŸ“ˆ Performance & Accuracy

Metric Accuracy / Stability
βœ… Quiz Classification Accuracy 100% across all subject modules
⚑ Summary Generation Speed < 2 seconds per PDF upload
🧹 Build Warnings 0 (Clean Codebase)
πŸ§ͺ Unit Test Pass Rate 100% (All modules covered)
πŸ”’ File Handling Stability 100% (UUID + try-finally system)

🧠 How It Works

User uploads PDF notes
        β”‚
        β–Ό
Text extracted via PyPDF2 (UUID temp file system)
        β”‚
        β–Ό
NLTK Pipeline ── Tokenise β†’ Remove stopwords β†’ TF-IDF β†’ Extract keywords
        β”‚
        β”œβ”€β”€β–Ί LSTM Model ──────────────► 50-word Smart Summary
        β”‚
        β”œβ”€β”€β–Ί K-Means Clustering ──────► Topic Groups β†’ Timed Study Plan
        β”‚
        └──► Logistic Regression ─────► 10 Quiz Questions (Easy / Medium / Hard)
                                                  β”‚
                                                  β–Ό
                                    ReportLab β†’ PDF + CSV Download

πŸ§ͺ Running Tests

python test_app.py

Expected output:

βœ… Python Module        β€” PASSED
βœ… Machine Learning     β€” PASSED
βœ… Deep Learning        β€” PASSED
βœ… NLP                  β€” PASSED
--------------------------------------
All tests passed. Accuracy: 100%

πŸ“œ License

This project is developed for educational and productivity purposes as part of the LaunchED Global AI/ML Internship Capstone.

MIT License β€” feel free to fork, modify, and build upon this project.
Please provide appropriate credit to the original author.

πŸ‘€ Author

Yash

AI / ML Intern @ LaunchED Global

*Built end-to-end with Python, TensorFlow, and a lot *


⭐ If this project helped you, please give it a star! ⭐

AI Study Pal β€” From raw notes to a complete study session, in seconds.

About

πŸŽ“ AI-powered web app that converts PDF notes into smart summaries, study plans & quizzes using LSTM, Scikit-learn & NLTK.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors