Python MIT License Open Source Project

AI Resume Screening System in Python Flask (Final Year Project with Source Code)

Build an AI resume screening system in Python with Flask and scikit-learn. Parse PDF/DOCX resumes, extract skills, rank candidates with TF-IDF and get free source code on GitHub.

Project Specifications & Technical Summary

Difficulty Beginner
License MIT License
Advertisement

Looking for a modern final-year project that uses real AI, works offline, and is easy to explain in the viva? In this tutorial we will build an AI resume screening system in Python, step by step, with Flask and scikit-learn.

You paste a job description, upload a few resumes, and the app ranks every candidate with a clear score out of 100. It also shows which skills matched and which skills are missing.

The complete code of this AI resume screening system in Python is free and open source on GitHub, so you can download it, run it in five minutes, and then make it your own.

What Is an AI resume screening system in Python?

Companies receive hundreds of resumes for a single job, and that is the problem a resume screening project solves. Reading all of them by hand takes days. A resume screening tool reads every resume automatically and tells the recruiter who fits the job best.

Our AI resume screening system in Python does this with Natural Language Processing (NLP). It turns each resume into text, finds the skills, compares the whole resume with the job description, and calculates a match score.

Real companies use Applicant Tracking Systems (ATS) that work on the same idea. A simple AI resume screening system in Python is basically a mini ATS. That is why this resume screening project is so popular with BTech, MCA and BCA students: the examiner understands the problem in seconds.

Why Choose This Resume Screening Project?

  • It uses real AI/NLP: TF-IDF and cosine similarity from scikit-learn.
  • It is full-stack: a Flask web app, an SQLite database, file uploads and CSV export.
  • It is explainable: every score is split into skill, similarity and experience parts.
  • It runs on any laptop: no GPU, no paid API and no internet connection needed.
  • It is tested: 12 automated tests with pytest, which is a great point for your report.

If you are still choosing a topic, also look at our 50 major project ideas for BTech CSE and MCA students and the top 20 artificial intelligence project ideas.

What You Will Build

By the end of this guide, your AI resume screening system in Python will:

  1. Accept a job description copied from any job portal.
  2. Accept up to 25 resumes at once in PDF, DOCX or TXT format.
  3. Extract the text and the skills from every resume.
  4. Calculate a match score from 0 to 100 and rank the candidates.
  5. Show matched skills, missing skills and bonus skills for each person.
  6. Save every screening in SQLite and let you download the ranking as CSV.
Upload page of the AI resume screening system in Python with job description and resume upload form
Upload a job description and resumes (PDF, DOCX or TXT).

Features of the AI Resume Screening System

  • Multi-format resume parser in Python: PDF, Word DOCX and plain text.
  • Skill extraction from an editable JSON dictionary of 66 skills with aliases, for example sklearn → scikit-learn and ReactJS → React.
  • Implied skills: MySQL also counts as SQL, and Flask also counts as Python.
  • Explainable score: 50% skill match, 35% text similarity and 15% experience fit.
  • Verdict badges: Strong, Good, Partial or Weak match.
  • Contact details: name, email, phone and years of experience are detected automatically.
  • Screening history with view and delete options.
  • CSV export for Excel or Google Sheets.
  • One-click demo with a sample job description and four sample resumes.
  • Command-line tool for batch screening.
  • Responsive design that also works on mobile.

Tech Stack Used

LayerTechnologyWhy we use it
LanguagePython 3.10+Easy to read and the most popular choice for AI projects
Web frameworkFlask 3Lightweight and perfect for student projects
NLP / MLscikit-learn TfidfVectorizerIndustry-standard text similarity
File parsingpypdf and python-docxRead PDF and Word resumes
DatabaseSQLiteBuilt into Python, nothing to install
Front endJinja2 templates + CSSSimple, no build step
TestingpytestProves the project works

Prerequisites

  • Python 3.10 or newer (check with python --version).
  • Basic Python knowledge: functions, lists and dictionaries.
  • A code editor such as VS Code.
  • Git, if you want to clone the repository.

You do not need any NLP experience. If you have built a simple Python project before, like our Library Management System in Python, you are ready.

Project Folder Structure

ai-resume-screening-system/
├── app.py                    # Flask app: routes, uploads, CSV export
├── resume_screener/
│   ├── extractor.py          # Read text from PDF / DOCX / TXT
│   ├── skills.py             # Skill dictionary + matcher
│   ├── scorer.py             # TF-IDF similarity, scoring, ranking
│   ├── database.py           # SQLite history
│   └── cli.py                # Command-line version
├── data/skills.json          # Add your own skills here
├── templates/                # HTML pages (Jinja2)
├── static/css/style.css
├── sample_data/              # Sample job description + 4 resumes
├── tests/                    # pytest tests
├── requirements.txt
└── README.md

In our AI resume screening system in Python, we keep the AI logic inside the resume_screener package and the web code in app.py. This separation makes the project easy to test and easy to explain.

How the AI resume screening system in Python Works

Every resume goes through four simple stages:

  1. Extract: read plain text from the PDF, DOCX or TXT file.
  2. Find skills: look for known skills and their aliases in that text.
  3. Compare: measure how close the whole resume is to the job description with TF-IDF and cosine similarity.
  4. Score and rank: combine skill match, similarity and experience into one score out of 100.
score = 100 × (0.50 × skill_match + 0.35 × text_similarity + 0.15 × experience_fit)

What is TF-IDF? TF-IDF (Term Frequency – Inverse Document Frequency) turns text into numbers. Words that are common in one document but rare in others get a higher weight. Cosine similarity then compares two of these number lists: 1.0 means very similar, 0 means nothing in common.

You can read more in the official scikit-learn guide to TF-IDF term weighting.

Step-by-Step: Build the AI resume screening system in Python

Let’s write the code for the AI resume screening system in Python. Each step is small, so you can test as you go.

Step 1: Create the Project and Install Libraries

Create a folder, set up a virtual environment and install four libraries:

mkdir ai-resume-screening-system && cd ai-resume-screening-system
python -m venv .venv
# Windows: .venv\Scripts\activate
source .venv/bin/activate

pip install Flask scikit-learn pypdf python-docx

Save them in requirements.txt so anyone can install the same set:

Flask>=3.0,<4
scikit-learn>=1.4
pypdf>=4.0
python-docx>=1.1

Step 2: Build a Resume Parser in Python (PDF, DOCX, TXT)

Resumes come in different formats, so the first module of our AI resume screening system in Python turns all of them into clean plain text. We check the file extension and use the right library for each one.

def extract_text_from_bytes(data: bytes, filename: str) -> str:
    """Return the text inside an uploaded file, based on its extension."""
    ext = Path(filename).suffix.lower()
    if ext not in SUPPORTED_EXTENSIONS:
        raise UnsupportedFileError(
            f"'{filename}' is not supported. Use PDF, DOCX or TXT."
        )

    if ext == ".pdf":
        reader = PdfReader(io.BytesIO(data))
        text = "\n".join(page.extract_text() or "" for page in reader.pages)
    elif ext == ".docx":
        document = Document(io.BytesIO(data))
        parts = [p.text for p in document.paragraphs]
        for table in document.tables:
            for row in table.rows:
                parts.append(" ".join(cell.text for cell in row.cells))
        text = "\n".join(parts)
    else:
        text = data.decode("utf-8", errors="ignore")

    return _clean(text)

The _clean() helper removes extra spaces and blank lines. After this step, every resume looks the same to the rest of the program.

Step 3: Create the Skill Dictionary

Instead of hard-coding skills, we keep them in data/skills.json, grouped by category. Each skill can have aliases, because people write the same skill in different ways.

{
  "Programming Languages": {
    "Python": ["python3"],
    "JavaScript": ["js", "es6"],
    "Go": ["golang", "go programming"]
  },
  "Data & AI": {
    "Machine Learning": ["ml"],
    "scikit-learn": ["sklearn", "scikit learn"],
    "Natural Language Processing": ["nlp"]
  },
  "Databases": {
    "MySQL": [],
    "PostgreSQL": ["postgres"]
  }
}

Want to screen for a marketing or mechanical role? Add a new category to this file. No Python changes are needed.

Step 4: Extract Skills with Smart Matching

A simple in check would give wrong results: “excel” is inside “excellent”, and “java” is inside “javascript”. So we use a regular expression with word boundaries that also work for C++, C# and node.js.

def _alias_pattern(alias: str) -> re.Pattern[str]:
    # Word boundaries that also work for skills like "c++", "c#" or "node.js".
    return re.compile(r"(?<![a-z0-9+#])" + re.escape(alias) + r"(?![a-z0-9+#])")


def extract_skills(text: str, skills: dict[str, list[str]] | None = None) -> set[str]:
    """Return the set of skill names that appear anywhere in the text."""
    skills = skills or load_skills()
    lowered = text.lower()
    found = set()
    for name, aliases in skills.items():
        if any(_alias_pattern(alias).search(lowered) for alias in aliases):
            found.add(name)
    found |= {IMPLIED_SKILLS[s] for s in found if s in IMPLIED_SKILLS and IMPLIED_SKILLS[s] in skills}
    return found

We also add implied skills. Anyone who knows MySQL or PostgreSQL clearly knows SQL, so they get credit for it:

IMPLIED_SKILLS = {
    "MySQL": "SQL",
    "PostgreSQL": "SQL",
    "SQLite": "SQL",
    "Django": "Python",
    "Flask": "Python",
    "FastAPI": "Python",
    "Next.js": "React",
    "Express.js": "Node.js",
}

Step 5: Measure Text Similarity with TF-IDF

Skills alone don’t tell the full story. Two resumes may both list Python, but one may describe exactly the work the job needs. TF-IDF with cosine similarity catches that difference.

def text_similarity(job_text: str, resume_texts: list[str]) -> list[float]:
    """TF-IDF cosine similarity of each resume against the job description."""
    if not resume_texts:
        return []
    vectorizer = TfidfVectorizer(stop_words="english", ngram_range=(1, 2), sublinear_tf=True)
    matrix = vectorizer.fit_transform([job_text, *resume_texts])
    return cosine_similarity(matrix[0:1], matrix[1:]).flatten().tolist()

We put the job description and all resumes into one TF-IDF matrix. Then we compare row 0 (the job) with every other row (the resumes). The setting ngram_range=(1, 2) also counts two-word phrases like “rest api”.

Step 6: Score and Rank Candidates in the AI resume screening system in Python

This is the heart of the AI resume screening system in Python. For every resume, we calculate three parts and combine them with weights:

results = []
for filename, similarity in zip(names, similarities):
    text = resumes[filename]
    skills = extract_skills(text)
    matched = sorted(job_skills & skills)
    missing = sorted(job_skills - skills)
    extra = sorted(skills - job_skills)

    skill_score = len(matched) / len(job_skills) if job_skills else similarity
    similarity_score = min(similarity * sim_scale, 1.0)
    years = years_of_experience(text)
    experience_score = 1.0 if required_years == 0 else min(years / required_years, 1.0)

    total = 100 * (
        WEIGHTS["skills"] * skill_score
        + WEIGHTS["similarity"] * similarity_score
        + WEIGHTS["experience"] * experience_score
    )

Years of experience come from a regular expression that finds phrases like “2 years” or “1.5 yrs”. If the job asks for 1+ years and the resume mentions 2, the experience fit is 100%.

YEARS_RE = re.compile(r"(\d{1,2}(?:\.\d)?)\s*\+?\s*(?:years?|yrs?)", re.I)

def years_of_experience(text: str) -> float:
    """Largest 'N years' value mentioned (0 when none)."""
    values = [float(v) for v in YEARS_RE.findall(text)]
    return max(values) if values else 0.0

Step 7: Save Results in SQLite

We store every screening, so a recruiter (or your examiner) can open old results again. SQLite is just one file inside the instance/ folder.

Advertisement
SCHEMA = """
CREATE TABLE IF NOT EXISTS screenings (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    job_title TEXT NOT NULL,
    job_description TEXT NOT NULL,
    created_at TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS candidates (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    screening_id INTEGER NOT NULL REFERENCES screenings(id) ON DELETE CASCADE,
    rank INTEGER NOT NULL,
    data TEXT NOT NULL
);
"""

Step 8: Create the Flask Web App

The Flask app has a home page with the upload form, a /screen route that processes uploads, a results page, a history page and a CSV download. Here is the main upload route:

@app.post("/screen")
def screen():
    job_title = request.form.get("job_title", "").strip() or "Untitled role"
    job_text = request.form.get("job_description", "").strip()
    files = [f for f in request.files.getlist("resumes") if f and f.filename]

    if not job_text:
        flash("Please paste the job description.", "error")
        return redirect(url_for("index"))
    if not files:
        flash("Please upload at least one resume.", "error")
        return redirect(url_for("index"))
    if len(files) > app.config["MAX_RESUMES"]:
        flash(f"You can upload up to {app.config['MAX_RESUMES']} resumes at a time.", "error")
        return redirect(url_for("index"))

    resumes, skipped = {}, []
    for f in files:
        try:
            text = extract_text_from_bytes(f.read(), f.filename)
        except UnsupportedFileError:
            skipped.append(f.filename)
            continue
        except Exception:  # damaged or password-protected file
            skipped.append(f.filename)
            continue
        if text:
            resumes[f.filename] = text
        else:
            skipped.append(f.filename)

    if skipped:
        flash("Skipped (unreadable or unsupported): " + ", ".join(skipped), "warning")
    if not resumes:
        return redirect(url_for("index"))

    results = [r.to_dict() for r in screen_resumes(job_text, resumes)]
    screening_id = db.save_screening(app.config["DATABASE"], job_title, job_text, results)
    return redirect(url_for("results", screening_id=screening_id))

Notice that we skip unreadable files instead of crashing, and we tell the user which files were skipped. Small touches like this make your project feel professional.

Step 9: Design the Results Page

The results page shows one card per candidate with a big score, three progress bars, and green (matched) and red (missing) skill chips:

<h2>{{ r.name }} <span class="badge">{{ r.verdict }}</span></h2>
<div class="bars">
  <div><span>Skills</span><progress max="100" value="{{ r.skill_score }}"></progress><b>{{ r.skill_score }}%</b></div>
  <div><span>Similarity</span><progress max="100" value="{{ r.similarity_score }}"></progress><b>{{ r.similarity_score }}%</b></div>
  <div><span>Experience</span><progress max="100" value="{{ r.experience_score }}"></progress><b>{{ r.experience_score }}%</b></div>
</div>
<p><b>Matched:</b> {% for k in r.matched_skills %}<span class="chip ok">{{ k }}</span>{% endfor %}</p>
<p><b>Missing:</b> {% for k in r.missing_skills %}<span class="chip miss">{{ k }}</span>{% endfor %}</p>

The templates use Jinja2, which comes with Flask. The Flask templates tutorial is a good place to learn more.

Step 10: Add a Command-Line Version

Sometimes you want to screen a whole folder without opening a browser. The CLI does exactly that, and it can also save a CSV:

python -m resume_screener.cli sample_data/job_description.txt sample_data/resumes --csv ranking.csv

Step 11: Write Tests with pytest

Tests prove that your AI resume screening system in Python works. They are also a strong talking point in the viva. Here is the test that checks our smart word matching:

def test_skill_aliases_and_boundaries():
    skills = extract_skills("Worked with sklearn, ReactJS, node.js and golang. Excellent C++ and C# skills.")
    assert {"scikit-learn", "React", "Node.js", "Go", "C++", "C#"} <= skills
    assert "Excel" not in skills          # "Excellent" must not count as Excel
    assert "Java" not in extract_skills("JavaScript developer")
    assert "Go" not in extract_skills("Ready to go the extra mile")
    assert "R" not in extract_skills("R&D team")
    assert "SQL" in extract_skills("Built reports on PostgreSQL")  # implied skill

How to Run the AI resume screening system in Python

Download the code from GitHub and start it with four commands:

git clone https://github.com/GetProjectsIdea/AI-Resume-Screening-System-in-Python-Flask.git
cd AI-Resume-Screening-System-in-Python-Flask
pip install -r requirements.txt
flask --app app run

Open http://127.0.0.1:5000 in your browser to see the AI resume screening system in Python running. Click Run Demo with Sample Data to see it work right away, or paste your own job description and upload resumes.

To run the tests:

pip install -r requirements-dev.txt
python -m pytest -q
# ............                                         [100%]
# 12 passed

Output of the AI Resume Screening System

We tested the app with a sample “Python Developer (Fresher)” job description and four fictional resumes: a Python/ML intern, a data analyst, a React developer and an Android developer.

The AI resume screening system in Python produced exactly the ranking a human recruiter would expect:

Rank Candidate               Score  Verdict         Missing skills
------------------------------------------------------------------------------
1    Aarav Sharma             77.0  Strong match    AWS
2    Priya Nair               47.3  Partial match   AWS, CSS, Django, Docker, Flask, ...
3    Rohan Verma              12.9  Weak match      AWS, Communication, Django, ...
4    Sneha Reddy               6.8  Weak match      AWS, CSS, Communication, ...

In the web app, each candidate gets a score card with skill, similarity and experience bars, plus matched and missing skill chips:

Ranked results of the AI resume screening system in Python showing match score, matched and missing skills
Ranked candidates with skill, similarity and experience scores.

The layout is responsive, so the results also look clean on a phone:

Mobile view of the AI resume screening system in Python Flask app
The results page on a 390 px mobile screen.

Future Enhancements for Your Project Report

  • Use spaCy or sentence-transformer embeddings for semantic matching, so “ML” and “predictive modelling” count as related.
  • Split skills into must-have and nice-to-have, with different weights.
  • Add education and CGPA filters for campus placements.
  • Add recruiter login and a candidate pipeline: shortlisted → interview → selected.
  • Add OCR with Tesseract to read scanned PDF resumes.
  • Build a REST API and a React front end.
  • Deploy online with Docker on Render or Railway.

Each enhancement turns this mini project into a bigger major project. You can also combine it with ideas from our 100 MTech thesis ideas if you need a research angle.

Responsible Use

Like any AI tool, an AI resume screening system in Python can make mistakes. Automated scores can be wrong or biased, for example when a resume is a scanned image or uses unusual words. Present this project as a tool that helps a human recruiter shortlist faster, not as a system that rejects people on its own.

Mentioning this limitation in your viva shows maturity, and examiners appreciate it.

FAQs: AI resume screening system in Python

Is this AI resume screening system in Python good for a BTech or MCA final-year project?

Yes. It combines NLP (TF-IDF and cosine similarity), a Flask web app, an SQLite database and pytest tests. That covers most evaluation criteria, and the future enhancements can turn it into a major project.

Is the source code free to use?

Yes. The complete code is on GitHub under the MIT License, so you can use, change and submit it. A star on the repo is appreciated.

Which algorithm is used for resume matching?

Skill matching uses a regex-based keyword matcher with aliases. Overall matching uses TF-IDF vectors with cosine similarity from scikit-learn. The final score is a weighted mix of skill match, similarity and experience fit.

Can it read scanned PDF resumes?

Not yet. Scanned PDFs are images with no text layer. You can add OCR with Tesseract (pytesseract) as an enhancement.

Do I need a GPU or internet connection?

No. Everything runs offline on a normal laptop, and TF-IDF is fast even on low-end machines.

How do I add skills for a non-IT job?

Open data/skills.json, add a new category such as “Marketing” with its skills and aliases, save the file and restart the app.


Conclusion

Congratulations! You have built a complete AI resume screening system in Python with Flask and scikit-learn. It reads resumes in three formats, extracts skills, measures similarity with TF-IDF, ranks candidates with an explainable score, and saves everything in SQLite.

This AI resume screening system in Python is a practical, modern final year project with source code that you can confidently present. Get the code, star the repo, and open an issue on GitHub if you get stuck.

Built something cool on top of it? Tell us in the comments below. Happy coding!


Keep exploring: browse all Python projects on GetProjects, or get free source code from our GitHub.

Advertisement

Team Get Projects

Contributor & Author
View All Projects →

Contributor at GetProjects.org, sharing open-source codebases, tutorials, and practical software architectures.

0 Discussion Comments

Markdown Supported

Join the Discussion & Code Review

Share architectural feedback, benchmark results, or troubleshooting notes.