Commit
·
bee6083
0
Parent(s):
ATS app
Browse files- .gitignore +1 -0
- README.md +10 -0
- app.py +88 -0
- poetry.lock +0 -0
- pyproject.toml +18 -0
- requirements.txt +4 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.env
|
README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: ATS-Tracking-System Application
|
| 3 |
+
emoji: 🦀
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: 1.39.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
app.py
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 2 |
+
import streamlit as st
|
| 3 |
+
from dotenv import load_dotenv
|
| 4 |
+
from langchain.prompts import PromptTemplate
|
| 5 |
+
import PyPDF2 as pdf
|
| 6 |
+
import os
|
| 7 |
+
|
| 8 |
+
load_dotenv()
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
# gemini pro response
|
| 16 |
+
def get_gemini_response(resume_text,job_description):
|
| 17 |
+
|
| 18 |
+
# llm
|
| 19 |
+
llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro",temperature=0,)
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
# prompt
|
| 23 |
+
prompt_template = """
|
| 24 |
+
Hey asct like a skilled or very experience ATS(Application Tracking System)
|
| 25 |
+
with a deep understanding of tech fields, Software Engineering, Data Science,
|
| 26 |
+
Fullstack web dwvelopment, Big Data Engineering, DEVOPS, Data Analyest,ML and DL Engineering,
|
| 27 |
+
Generative AI engineering and having deep ATS functionality,
|
| 28 |
+
Your Task is to avaluate the resume based on the given job description.
|
| 29 |
+
You must consider the job market is very competitive and you should provide best assistance
|
| 30 |
+
for improving the resumes. Assign the percentage Matching based on the jd and
|
| 31 |
+
the missing keywordswith high accuracy
|
| 32 |
+
resume:{text}
|
| 33 |
+
description:{job_description}
|
| 34 |
+
|
| 35 |
+
I want the reason that having structure
|
| 36 |
+
{{"JD Match":"%",
|
| 37 |
+
"MissingKeywieds:[]",
|
| 38 |
+
"Profile Summary":""}}
|
| 39 |
+
|
| 40 |
+
"""
|
| 41 |
+
prompt = PromptTemplate(template=prompt_template, input_variables=["text", "job_description"] )
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
# chaining
|
| 45 |
+
chain = prompt | llm
|
| 46 |
+
|
| 47 |
+
# invoke the response
|
| 48 |
+
response = chain.invoke({"text":resume_text, "job_description":job_description })
|
| 49 |
+
return response.content
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
# extract the text from uploaded_file
|
| 54 |
+
def input_pdf_text(uploaded_file):
|
| 55 |
+
reader = pdf.PdfReader(uploaded_file)
|
| 56 |
+
text=""
|
| 57 |
+
for page_num in range(len(reader.pages)):
|
| 58 |
+
page = reader.pages[page_num]
|
| 59 |
+
text+=page.extract_text()
|
| 60 |
+
return text
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
# streamlit app
|
| 65 |
+
st.set_page_config(page_title="ATS Resume Expert")
|
| 66 |
+
st.header("ATS Tracking System")
|
| 67 |
+
st.text("Improve Your Resume Through ATS")
|
| 68 |
+
|
| 69 |
+
job_description = st.text_area("Past the Job Description :")
|
| 70 |
+
|
| 71 |
+
uploaded_file = st.file_uploader("Upload Your Resume" ,type="pdf", help="please upload the pdf")
|
| 72 |
+
|
| 73 |
+
if uploaded_file is not None:
|
| 74 |
+
st.write("PDF Uploaded Successfully")
|
| 75 |
+
|
| 76 |
+
submit = st.button("Submit")
|
| 77 |
+
|
| 78 |
+
if submit:
|
| 79 |
+
if uploaded_file is not None:
|
| 80 |
+
resume_text = input_pdf_text(uploaded_file)
|
| 81 |
+
response = get_gemini_response(resume_text,job_description)
|
| 82 |
+
st.subheader("The response is:")
|
| 83 |
+
st.write(response)
|
| 84 |
+
else:
|
| 85 |
+
st.write("please upload a resume")
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
|
poetry.lock
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pyproject.toml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[tool.poetry]
|
| 2 |
+
name = "resume application tracking system(ats) app using gemini"
|
| 3 |
+
version = "0.1.0"
|
| 4 |
+
description = ""
|
| 5 |
+
authors = ["Nasir Abbas <akhtarabbas.islamicreaction@gmail.com>"]
|
| 6 |
+
readme = "README.md"
|
| 7 |
+
|
| 8 |
+
[tool.poetry.dependencies]
|
| 9 |
+
python = "^3.12"
|
| 10 |
+
python-dotenv = "^1.0.1"
|
| 11 |
+
streamlit = "^1.39.0"
|
| 12 |
+
pypdf2 = "^3.0.1"
|
| 13 |
+
langchain-google-genai = "^2.0.1"
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
[build-system]
|
| 17 |
+
requires = ["poetry-core"]
|
| 18 |
+
build-backend = "poetry.core.masonry.api"
|
requirements.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
streamlit
|
| 2 |
+
langchain-google-genai
|
| 3 |
+
python-dotenv
|
| 4 |
+
PyPDF2
|