A Streamlit app that compares a resume against a job description and returns a match score, strengths, skill gaps, and an apply/pass recommendation.
- Resume input: upload PDF, DOCX, or TXT, or paste resume text
- Job description: paste the full JD in the app
- Match score (0–100): weighted blend of skills, semantic similarity, and experience fit
- Strengths: highlights where your resume aligns well
- Skills analysis: matched skills, missing skills, and bonus skills
- Recommendation: Apply, Consider applying, or Pass with a short explanation
| Component | Weight | Description |
|---|---|---|
| Skills match | 50% | Overlap between skills found in resume vs job description |
| Semantic similarity | 25% | TF-IDF cosine similarity between resume and JD text |
| Experience fit | 25% | Resume years of experience vs years required in JD |
| Score | Verdict |
|---|---|
| ≥ 75% | Apply |
| 55–74% | Consider applying |
| < 55% | Pass |
.
├── app.py # Streamlit UI
├── analyzer.py # Analysis logic (extraction, scoring, recommendations)
├── prompts.py # Model instructions, thresholds, and prompt templates
├── skills_db.json # Skills dictionary
└── requirements.txt
-
Clone the repository (or open the project folder).
-
Create a virtual environment (recommended):
python -m venv .venv
Activate it:
- Windows:
.venv\Scripts\activate - macOS/Linux:
source .venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
streamlit run app.pyOpen the URL shown in the terminal (usually http://localhost:8501).
- Upload a resume file or paste resume text in the left panel.
- Paste the job description in the right panel.
- Click Analyze Match.
- Review the overall score, breakdown, strengths, missing skills, and recommendation.
- Add skills: edit
skills_db.jsonwith domain-specific technologies or tools. - Tune weights & thresholds: adjust constants in
prompts.py. - Change analysis logic: modify functions in
analyzer.py. - LLM integration: use
SYSTEM_PROMPTandUSER_PROMPT_TEMPLATEinprompts.py.
- Skill detection uses keyword matching against a predefined list — synonyms or uncommon phrasing may be missed.
- PDF text extraction works best on text-based PDFs; scanned images require OCR (not included).
- Scores are heuristic guides, not hiring decisions.
- Python 3.10+
- See
requirements.txtfor package versions
This project supports optional LLM integrations and local deterministic analysis. A .env file at the repo root controls behavior. Example variables (see .env template):
- GEMINI_API_KEY — Google Gemini API key (optional)
- GEMINI_MODEL — Gemini model name (default: gemini-pro)
- OPENAI_API_KEY — OpenAI API key (optional)
- OPENAI_MODEL — OpenAI model name (default: gpt-4o)
- MODEL_PROVIDER — Default provider:
geminioropenai(default: gemini) - TIMEOUT — Request timeout in seconds (default: 30)
- LOG_LEVEL — DEBUG/INFO/WARNING/ERROR
- PROGRESS_UI —
consoleornone
Notes:
.envis listed in.gitignore; do not commit API keys. Prefer a secrets manager in production.- If MODEL_PROVIDER is set but the corresponding API key is missing, the app falls back to the local analyzer (TF‑IDF + keyword matching) and shows a warning.
config.py— simple env-backed configuration loader (usespython-dotenvif available).progress.py— console spinner utilities for CLI flows. Streamlit UI usesst.spinnerfor progress.analyzer.py— the deterministic analyzer: skill extraction, TF‑IDF semantic similarity, experience parsing, scoring, and recommendation logic.prompts.py— thresholds, templates, and LLM prompt text (reserved for future LLM-based scoring).
The codebase uses a local deterministic analyzer by default. An llm_client.py module is included to support LLM providers with safe fallbacks:
- Provider selection: controlled by
MODEL_PROVIDERand theUSE_LLMflag in.env(default:USE_LLM=false). - Supported providers in this repo:
openai,gemini(wrappers require provider SDKs) and a localmockprovider for free testing. - If
USE_LLMis false, the app always uses the local analyzer (no network calls). - If
USE_LLMis true and the configured provider is unavailable or the client library is missing, the client falls back to the local analyzer.
Files added:
llm_client.py— provider selection, OpenAI & Gemini wrappers (optional), and mock provider.scripts/demo_mock_llm.py— demo script that exercises the mock provider locally (free).
Safe usage notes:
- Keep
USE_LLM=falseduring development to avoid accidental calls and charges. - To enable live calls: install provider SDKs (e.g.,
pip install openai) and setUSE_LLM=trueand the corresponding API key in.env. - The OpenAI/Gemini wrapper code expects JSON-formatted responses from the LLM; if parsing fails, it falls back to the local analyzer.
- Create a virtualenv and install dependencies:
pip install -r requirements.txt.openaiis listed as optional inrequirements.txt— install it only if you plan to use OpenAI live.
- Copy
.env.templateto.envand set your keys andUSE_LLM=trueonly when you intend to make live calls.- Example:
Copy-Item .env.template .env(PowerShell) then edit.env.
- Example:
- Start the app:
streamlit run app.py.
To run the free mock demo (no API keys required):
python scripts\demo_mock_llm.py- Do not store API keys in source control.
.envis ignored by default and a.env.templateis provided for safe commits. - Monitor billing on OpenAI/Gemini accounts; enable budget alerts and quotas in your provider console.
- Use small prompts, short timeouts, and rate limits when experimenting with live LLMs.
- Unit tests are included under
tests/(run withpython -m unittest discover -v). Tests currently verify analyzer behavior and the llm_client fallback to local analysis. - For CI, mock LLM providers to avoid external calls and costs.
If you want, add CI, end-to-end tests, or enable a production-grade LLM client with stricter rate and cost controls.