Skip to content

StudySage 🧠 – An offline, AI-powered note assistant that helps students summarize notes, generate quizzes, extract handwritten text from images (OCR), and export content to PDFβ€”all from a sleek terminal or desktop GUI.

License

Notifications You must be signed in to change notification settings

Sahaj33-op/StudySage-Offline-Online-AI-Note-Assistant

Repository files navigation

🧠 StudySage – Offline & Online AI Note Assistant


               β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•—β€ƒβ€ƒβ–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
               β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β€ƒβ€ƒβ–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β•β•
               β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β€ƒβ€ƒβ•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘
               β–‘β•šβ•β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β•šβ–ˆβ–ˆβ•”β•β–‘β–‘β€ƒβ€ƒβ–‘β•šβ•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–‘β–‘
               β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β€ƒβ€ƒβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
               β•šβ•β•β•β•β•β•β–‘β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β–‘β•šβ•β•β•β•β•β•β–‘β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β€ƒβ€ƒβ•šβ•β•β•β•β•β•β–‘β•šβ•β•β–‘β–‘β•šβ•β•β–‘β•šβ•β•β•β•β•β•β–‘β•šβ•β•β•β•β•β•β•

                           StudySage – Offline AI Note Assistant by Sahaj33

AI-powered summary & quiz generator with OCR, PDF export, offline/online modes, and Streamlit/GUI/CLI support.

Streamlit Deploy

Python Offline AI MIT License

✨ Key Features β€’ πŸ“‚ Project Structure β€’ 🧠 Online vs Offline Mode β€’ πŸš€ Quickstart β€’ πŸ–Ό GUI (CustomTkinter)

βš™οΈ Setup Instructions 🧠 Credits πŸ“œ License πŸ™Œ Author

✨ Key Features

Feature Description
πŸ“ Summary Generation Summarize text files, markdown, PDFs, or OCR'd images using AI
πŸ§ͺ Quiz Question Generator Create MCQs from summaries with distractors
πŸ–Ό OCR from Images Extract text from .jpg/.png via Tesseract
πŸ“„ PDF Export (Manual) Export summary/quiz to PDF with user confirmation
πŸ’Ύ Save to Text File Save generated content to .txt
πŸ”„ Online & Offline Mode Choose between offline summarizer or Hugging Face API
🌐 Streamlit Web UI Sleek, scrollable web interface with PDF download buttons
πŸ–₯ Desktop GUI CustomTkinter GUI version for local use
πŸ§ͺ Smart CLI Interface Modular feature selection, input flow control, minimal logs
🧠 Hugging Face API Support Uses sshleifer/distilbart-cnn-12-6 offline or via token

πŸ“‚ Project Structure

StudySage/
β”œβ”€β”€ app.py                  # Streamlit Web UI
β”œβ”€β”€ main.py                 # CLI mode entry
β”œβ”€β”€ gui.py                  # Desktop GUI
β”œβ”€β”€ export_pdf.py           # PDF generation
β”œβ”€β”€ quiz_gen.py             # Quiz generator logic
β”œβ”€β”€ summarize_text.py       # Summary generator logic
β”œβ”€β”€ ocr_reader.py           # OCR image text reader
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ README.md               # Project overview
β”œβ”€β”€ LICENSE                 # MIT License
β”œβ”€β”€ output/                 # (gitignored) Generated files
β”œβ”€β”€ assets/                 # Logo, banner, optional GUI images
└── .gitignore              # Clean repo config

🧠 Online vs Offline Mode

Mode Summary Engine Quiz Engine OCR Requires Internet
Offline Local model (DistilBART) Local NLTK Yes ❌
Online HuggingFace API (faster & better) Local NLTK Yes βœ… (API key)

To use online mode, generate a Hugging Face token: https://huggingface.co/settings/tokens


πŸš€ Quickstart

πŸ–₯ CLI Mode

git clone https://github.com/Sahaj33-op/StudySage-Offline-Online-AI-Note-Assistant
cd StudySage-Offline-Online-AI-Note-Assistant
python main.py
  • Choose Offline or Online
  • Enter note file (.txt, .pdf, .md, .jpg, .png)
  • Set summary word range (optional)
  • Generate summary
  • Prompt: Want to generate quiz? (y/n)
  • Prompt: Save summary/quiz as PDF? (y/n)
  • Output shown in clean format

🌐 Streamlit Web App

streamlit run app.py
  • Upload file
  • Choose features: Summary, Quiz
  • Customize summary range
  • Click Process
  • Auto-scrolls to output
  • Buttons to download PDF

🧠 Supports session memory β€” doesn’t lose results after button clicks!


πŸ–Ό GUI (CustomTkinter)

python gui.py
  • Pick file with Choose File

  • Click buttons:

    • Generate Summary
    • OCR (Image)
    • Export PDF
    • Save as .txt

βš™οΈ Setup Instructions

βœ… Prerequisites

  • Python 3.10+

  • pip

  • Tesseract OCR

    • Windows: Add to PATH or set tesseract_cmd in code
    • Linux: sudo apt install tesseract-ocr
    • macOS: brew install tesseract

git clone https://github.com/Sahaj33-op/StudySage-Offline-Online-AI-Note-Assistant
cd StudySage-Offline-Online-AI-Note-Assistant

πŸ§ͺ Create a Virtual Environment (Optional but Recommended)

pip install virtualenv
virtualenv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows

πŸ“¦ Install Requirements

pip install -r requirements.txt

If using HuggingFace online mode, download tokenizer models on first use.


πŸ“₯ Packaging as Executable (.exe)

You can package this into a standalone .exe for easy Windows sharing:

pip install pyinstaller
pyinstaller --onefile --windowed main.py      # For CLI exe
pyinstaller --onefile --windowed gui.py       # For GUI exe

Result will appear in /dist. These are excluded from Git tracking via .gitignore.


πŸ” Clean GitHub Repo (.gitignore)

Git ignores:

  • output/ PDFs and temporary files
  • models/, __pycache__/, .DS_Store
  • PyInstaller build files (build/, dist/, main.spec)
  • config.json (contains sensitive keys)

βœ… Run:

git add .
git commit -m "Clean project, add new features"
git push origin main

🧠 Credits

  • Hugging Face (transformers)
  • sshleifer/distilbart-cnn-12-6 model
  • Streamlit
  • PyMuPDF, ReportLab, Pillow
  • Tesseract OCR

πŸ“œ License

Licensed under the MIT License


πŸ™Œ Author

Made with ❀️ by Sahaj33 Let’s empower learning with AI!


About

StudySage 🧠 – An offline, AI-powered note assistant that helps students summarize notes, generate quizzes, extract handwritten text from images (OCR), and export content to PDFβ€”all from a sleek terminal or desktop GUI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages