decodingdatascience commited on
Commit
4ef477d
1 Parent(s): 9efb392

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +60 -0
  2. requirements.txt +4 -0
app.py ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
7
+
8
+ load_dotenv() ## load all our environment variables
9
+
10
+ genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
11
+
12
+
13
+ #gemini function
14
+ def get_gemini_repsonse(input):
15
+ model=genai.GenerativeModel('gemini-pro')
16
+ response=model.generate_content(input)
17
+ return response.text
18
+
19
+
20
+ # converting the pdf to text
21
+ def input_pdf_text(uploaded_file):
22
+ reader=pdf.PdfReader(uploaded_file)
23
+ text=""
24
+ for page in range(len(reader.pages)):
25
+ page=reader.pages[page]
26
+ text+=str(page.extract_text())
27
+ return text
28
+
29
+ #Prompt Template
30
+
31
+ input_prompt="""
32
+ Hey Act Like a skilled or very experience ATS(Application Tracking System)
33
+ with a deep understanding of tech field,software engineering,data science ,Artificial intelligence,data analyst
34
+ and big data engineer. Your task is to evaluate the resume based on the given job description.
35
+ You must consider the job market is very competitive and you should provide
36
+ best assistance for improving the resumes. Assign the percentage Matching based
37
+ on Jd and the missing keywords with high accuracy
38
+ resume:{text}
39
+ description:{jd}
40
+
41
+ I want the response in Three blocks having the structure
42
+ JD Match:"%"
43
+ Missing Keywords:[]
44
+ Tips to Improve the Resume for Higher Match :""}}
45
+ """
46
+
47
+ ## streamlit app front end
48
+
49
+ st.title("DDS Smart ATS")
50
+ st.text("Improve Your Resume ATS Score Match")
51
+ jd=st.text_area("Paste the Job Description")
52
+ uploaded_file=st.file_uploader("Upload Your Resume",type="pdf",help="Please upload the pdf")
53
+
54
+ submit = st.button("Submit")
55
+
56
+ if submit:
57
+ if uploaded_file is not None:
58
+ text=input_pdf_text(uploaded_file)
59
+ response=get_gemini_repsonse(input_prompt)
60
+ st.subheader(response)
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ streamlit
2
+ PyPDF2
3
+ google.generativeai
4
+ python-dotenv