This project compares a resume PDF against a job description and returns structured JSON.
- CLI mode for local testing
- FastAPI endpoint for API usage
- Structured output validated with Pydantic
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
# source .venv/bin/activate
pip install -r requirements.txtCreate a .env file:
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-4o-miniuvicorn app:app --host 0.0.0.0 --port 8000Health check:
curl http://localhost:8000/healthAnalyze endpoint:
curl -X POST "http://localhost:8000/analyze" \
-F "pdf=@resume.pdf" \
-F "jd=Looking for a Data Engineer with Python, SQL, and AWS experience."python app.py --pdf resume.pdf --jd jd.txt --out response.json- Push this repo to GitHub.
- Deploy with a service like Render, Railway, or Fly.io.
- Set environment variable
OPENAI_API_KEYin the deployment dashboard. - Use start command:
uvicorn app:app --host 0.0.0.0 --port $PORT- Share the deployed URL, for example:
https://your-app.onrender.com/analyze
pypdfextracts text only from text-based PDFs, not scanned image PDFs.- For scanned resumes, add OCR (for example
pytesseract) before analysis.