Spaces:
Sleeping
Sleeping
funnyPhani
commited on
Commit
•
1f16df9
1
Parent(s):
455abea
Create app.pt
Browse files
app.pt
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import PyPDF2 as pdf
|
3 |
+
import streamlit as st
|
4 |
+
from dotenv import load_dotenv
|
5 |
+
import google.generativeai as genai
|
6 |
+
|
7 |
+
# Load the environment variables
|
8 |
+
load_dotenv()
|
9 |
+
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
10 |
+
model = genai.GenerativeModel('gemini-1.5-flash-latest')
|
11 |
+
|
12 |
+
st.set_page_config(page_title="Smart Application Tracking System", page_icon=":robot:")
|
13 |
+
|
14 |
+
# page_bg_img = f"""
|
15 |
+
# <style>
|
16 |
+
# [data-testid="stAppViewContainer"] > .main {{
|
17 |
+
# background-image: url("https://e0.pxfuel.com/wallpapers/219/656/desktop-wallpaper-purple-color-background-best-for-your-mobile-tablet-explore-color-cool-color-colored-background-one-color-aesthetic-one-color.jpg");
|
18 |
+
# background-size: 180%;
|
19 |
+
# background-position: top left;
|
20 |
+
# background-repeat: no-repeat;
|
21 |
+
# background-attachment: local;
|
22 |
+
# }}
|
23 |
+
|
24 |
+
# [data-testid="stHeader"] {{
|
25 |
+
# background: rgba(0,0,0,0);
|
26 |
+
# }}
|
27 |
+
|
28 |
+
# [data-testid="stToolbar"] {{
|
29 |
+
# right: 2rem;
|
30 |
+
# }}
|
31 |
+
# </style>
|
32 |
+
# """
|
33 |
+
|
34 |
+
# st.markdown(page_bg_img, unsafe_allow_html=True)
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
## streamlit app
|
39 |
+
st.title("SMART APPLICATION TRACKING SYSTEM")
|
40 |
+
st.text("Improve Your Resume ATS Score")
|
41 |
+
jd=st.text_area("Paste the Job Description")
|
42 |
+
uploaded_file=st.file_uploader("Upload Your Resume",type="pdf",help="Please uplaod the pdf")
|
43 |
+
|
44 |
+
submit = st.button("Submit")
|
45 |
+
|
46 |
+
if submit:
|
47 |
+
if uploaded_file is not None:
|
48 |
+
reader=pdf.PdfReader(uploaded_file)
|
49 |
+
extracted_text=""
|
50 |
+
for page in range(len(reader.pages)):
|
51 |
+
page=reader.pages[page]
|
52 |
+
extracted_text+=str(page.extract_text())
|
53 |
+
#Prompt Template
|
54 |
+
input_prompt=f"""
|
55 |
+
You are an advanced Applicant Tracking System (ATS) with deep expertise in the fields of software engineering, data science, data analysis, and big data engineering. Your primary task is to meticulously evaluate the provided resume against the given job description. The evaluation must account for the highly competitive job market, and you should offer valuable insights for improving the resume's relevance to the job description.
|
56 |
+
|
57 |
+
Your response should focus on the following three areas:
|
58 |
+
|
59 |
+
1. **Job Description Match:**
|
60 |
+
Provide a percentage match score based on how well the resume aligns with the job description. This score should consider the candidate's skills, experience, and qualifications in relation to the job requirements.
|
61 |
+
|
62 |
+
2. **Missing Keywords:**
|
63 |
+
Identify and list the key terms and phrases from the job description that are missing from the resume. Highlight those that are critical to the job and may significantly impact the resume's match score.
|
64 |
+
|
65 |
+
3. **Profile Summary:**
|
66 |
+
Create a concise and impactful profile summary based on the information extracted from the resume. The summary should highlight the candidate's most relevant skills, experience, and achievements in a manner that aligns with the job description.
|
67 |
+
|
68 |
+
Resume: {extracted_text}
|
69 |
+
Job Description: {jd}
|
70 |
+
"""
|
71 |
+
|
72 |
+
# input_prompt=f"""
|
73 |
+
# You are a skilled and very experience ATS(Application Tracking System) with a deep understanding of tech field,software engineering,
|
74 |
+
# data science ,data analyst, and big data engineer. Your task is to evaluate the resume based on the given job description.
|
75 |
+
# You must consider the job market is very competitive and you should provide best assistance for improving thr resumes.
|
76 |
+
# Assign the percentage Matching based on Job description and the missing keywords with high accuracy
|
77 |
+
# Resume:{extracted_text}
|
78 |
+
# Description:{jd}
|
79 |
+
|
80 |
+
# I want the only response in 3 sectors as follows:
|
81 |
+
# • Job Description Match: \n
|
82 |
+
# • MissingKeywords: \n
|
83 |
+
# • Profile Summary: should be based on the {extracted_text} in short and concise manner.\n
|
84 |
+
# """
|
85 |
+
response = model.generate_content(input_prompt)
|
86 |
+
st.write(response.text)
|