AbhayBhaskar1
commited on
Commit
•
357dd11
1
Parent(s):
eac0b75
Add application file
Browse files- .env +1 -0
- app.py +52 -0
- requirements.txt +4 -0
.env
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
GOOGLE_API_KEY="AIzaSyC7htTYEElaVhV-lrF_uKG1eRycBrbQxfY"
|
app.py
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import google.generativeai as genai
|
3 |
+
import os
|
4 |
+
import PyPDF2 as pdf
|
5 |
+
from dotenv import load_dotenv
|
6 |
+
import json
|
7 |
+
|
8 |
+
load_dotenv() ## load all our environment variables
|
9 |
+
|
10 |
+
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
11 |
+
|
12 |
+
def get_gemini_repsonse(input):
|
13 |
+
model=genai.GenerativeModel('gemini-pro')
|
14 |
+
response=model.generate_content(input)
|
15 |
+
return response.text
|
16 |
+
|
17 |
+
def input_pdf_text(uploaded_file):
|
18 |
+
reader=pdf.PdfReader(uploaded_file)
|
19 |
+
text=""
|
20 |
+
for page in range(len(reader.pages)):
|
21 |
+
page=reader.pages[page]
|
22 |
+
text+=str(page.extract_text())
|
23 |
+
return text
|
24 |
+
|
25 |
+
#Prompt Template
|
26 |
+
|
27 |
+
input_prompt="""
|
28 |
+
Hey Act Like a skilled or very experience ATS(Application Tracking System)
|
29 |
+
with a deep understanding of tech field,software engineering,data science ,data analyst
|
30 |
+
and big data engineer. Your task is to evaluate the resume based on the given job description.
|
31 |
+
You must consider the job market is very competitive and you should provide
|
32 |
+
best assistance for improving thr resumes. Assign the percentage Matching based
|
33 |
+
on Jd and
|
34 |
+
the missing keywords with high accuracy
|
35 |
+
resume:{text}
|
36 |
+
description:{jd}
|
37 |
+
|
38 |
+
"JD Match":"70%","MissingKeywords":["Machine Learning","Cloud Computing","Artificial Intelligence"],"Profile Summary":"The resume demonstrates a strong foundation in software engineering and data analysis. However, it could benefit from highlighting additional experience in cloud computing, machine learning, and artificial intelligence to better align with the job description."
|
39 |
+
"""
|
40 |
+
|
41 |
+
## streamlit app
|
42 |
+
st.header("ATS Tracking System")
|
43 |
+
jd=st.text_area("Paste the Job Description")
|
44 |
+
uploaded_file=st.file_uploader("Upload Your Resume",type="pdf",help="Please uplaod the pdf")
|
45 |
+
|
46 |
+
submit = st.button("Submit")
|
47 |
+
|
48 |
+
if submit:
|
49 |
+
if uploaded_file is not None:
|
50 |
+
text=input_pdf_text(uploaded_file)
|
51 |
+
response=get_gemini_repsonse(input_prompt)
|
52 |
+
st.subheader(response)
|
requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
streamlit
|
2 |
+
PyPDF2
|
3 |
+
google.generativeai
|
4 |
+
python-dotenv
|