A modern, intelligent document analyzer powered by Claude AI and FastAPI. Upload PDF documents and ask natural language questions to get AI-powered answers based on your document content.
- PDF Upload: Drag-and-drop interface for uploading PDF documents
- Smart Q&A: Ask questions and get intelligent answers based on document content
- RAG System: Uses Retrieval-Augmented Generation with TF-IDF for relevant chunk selection
- Multiple Documents: Manage and query across multiple uploaded documents
- Real-time Processing: Fast responses powered by Claude 3.5 Sonnet
- Beautiful UI: Modern, responsive web interface with gradient design
- RESTful API: Clean API endpoints for integration
- Backend: FastAPI (Python)
- AI: Anthropic Claude API (Claude 3.5 Sonnet)
- Vector Search: scikit-learn TF-IDF for semantic search
- PDF Processing: PyPDF2
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Deployment: Vercel
ai-doc-qa/
├── main.py # FastAPI application & API routes
├── static/
│ └── index.html # Web UI (beautiful responsive interface)
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── vercel.json # Vercel deployment configuration
├── .gitignore # Git ignore rules
└── README.md # This file
- Python 3.8+
- pip
- Anthropic API key (get from console.anthropic.com)
-
Create virtual environment
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment
cp .env.example .env # Edit .env and add your ANTHROPIC_API_KEY -
Run locally
uvicorn main:app --reload
-
Visit http://localhost:8000
- Retrieval-Augmented Generation (RAG)
- Claude 3.5 Sonnet Integration
- Semantic Search with TF-IDF
- Real-time AI Responses
- Multi-Document Processing
- Push to GitHub
- Visit vercel.com and import the repository
- Add ANTHROPIC_API_KEY environment variable
- Deploy!
MIT License