Skip to content

JGrace99/study-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Study Assistant

A Flask web app that extracts text from uploaded PDF notes and generates an AI-powered summary with key points using the Anthropic API.

Features

  • Upload a PDF (lecture notes, textbook excerpts, study materials)
  • Extracts text from the PDF automatically
  • Sends the content to Claude for summarization
  • Returns a concise summary and a list of key points
  • Clean, responsive UI with side-by-side layout on desktop

Tech Stack

  • Backend: Python, Flask
  • PDF Extraction: PyMuPDF (fitz)
  • AI Summarization: Anthropic API (Claude)
  • Frontend: HTML, CSS, Bootstrap, Jinja2
  • Environment Management: python-dotenv

Project Structure

study-assistant/
├── app.py               # Flask app, routes, and helper functions
├── templates/
│   └── index.html       # Main UI template
├── static/
│   └── style.css        # Custom styles
├── uploads/             # Temporary PDF storage
├── .env                 # API key (not committed)
├── .gitignore
└── requirements.txt

Getting Started

Prerequisites

Installation

  1. Clone the repository
git clone https://github.com/yourusername/study-assistant.git
cd study-assistant
  1. Create and activate a virtual environment
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Create a .env file in the project root and add your API key
ANTHROPIC_API_KEY=your_api_key_here
  1. Run the app
flask run
  1. Open your browser and go to http://127.0.0.1:5000

Usage

  1. Click the upload area or browse to select a PDF file
  2. Click Upload & Summarize
  3. The app extracts the text, sends it to Claude, and displays a summary with key points

Security Notes

  • File uploads are validated for .pdf extension only
  • Filenames are sanitized using werkzeug.utils.secure_filename
  • API keys are stored in .env and never committed to version control

Future Improvements

  • Quiz and flashcard generation from uploaded notes
  • Support for saving and revisiting past summaries
  • Token limit handling for very large PDFs
  • Deployment to a live URL

About

A Flask web app that extracts text from uploaded PDF notes and generates an AI-powered summary with key points using the Anthropic API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors