A simple FastAPI application that accepts a PDF resume, extracts text using PDF text extraction and OCR, then sends the text to a local LLM for HR-style structured analysis.
- Accepts PDF resume uploads
- Extracts text from embedded PDF text or scans pages with Tesseract OCR
- Calls a local LLM endpoint at
http://localhost:8000/v1/chat/completions - Returns HR-friendly structured JSON, summary, and hire/no-hire recommendation
- Python 3.12
tesseractinstalled on your systempopplerinstalled forpdf2image
On macOS:
brew install tesseract popplerpython -m pip install -r requirements.txtuvicorn main:app --reload --host 0.0.0.0 --port 8001curl -F "resume_file=@resume.pdf;type=application/pdf" \
-F "job_description=We are hiring a senior software engineer with Python and machine learning experience." \
http://localhost:8001/analyze_resumeThe app uses these defaults:
LLM_API_URL=http://localhost:8000/v1/chat/completionsLLM_MODEL=Qwen/Qwen2.5-1.5B-Instruct
If your LLM requires an API key, set LLM_API_KEY.