ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
StudySage β Offline AI Note Assistant by Sahaj33
AI-powered summary & quiz generator with OCR, PDF export, offline/online modes, and Streamlit/GUI/CLI support.
β¨ Key Features β’ π Project Structure β’ π§ Online vs Offline Mode β’ π Quickstart β’ πΌ GUI (CustomTkinter)
βοΈ Setup Instructions π§ Credits π License π Author
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 |
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
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
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 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!
python gui.py
-
Pick file with Choose File
-
Click buttons:
- Generate Summary
- OCR (Image)
- Export PDF
- Save as .txt
-
Python 3.10+
-
pip
-
- Windows: Add to PATH or set
tesseract_cmd
in code - Linux:
sudo apt install tesseract-ocr
- macOS:
brew install tesseract
- Windows: Add to PATH or set
git clone https://github.com/Sahaj33-op/StudySage-Offline-Online-AI-Note-Assistant
cd StudySage-Offline-Online-AI-Note-Assistant
pip install virtualenv
virtualenv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
If using HuggingFace online mode, download tokenizer models on first use.
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
.
Git ignores:
output/
PDFs and temporary filesmodels/
,__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
- Hugging Face (
transformers
) sshleifer/distilbart-cnn-12-6
model- Streamlit
- PyMuPDF, ReportLab, Pillow
- Tesseract OCR
Licensed under the MIT License
Made with β€οΈ by Sahaj33 Letβs empower learning with AI!