Surat96 commited on
Commit
b323a05
·
verified ·
1 Parent(s): 40f9305

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +53 -0
app.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import google.generativeai as genai
3
+ import os
4
+ import PyPDF2 as pdf
5
+ import json
6
+
7
+
8
+
9
+ def get_gemini_repsonse(input):
10
+ model=genai.GenerativeModel('gemini-pro')
11
+ response=model.generate_content(input)
12
+ return response.text
13
+
14
+ def input_pdf_text(uploaded_file):
15
+ reader=pdf.PdfReader(uploaded_file)
16
+ text=""
17
+ for page in range(len(reader.pages)):
18
+ page=reader.pages[page]
19
+ text+=str(page.extract_text())
20
+ return text
21
+
22
+ #Prompt Template
23
+
24
+ input_prompt="""
25
+ Hey Act Like a skilled or very experience ATS(Application Tracking System)
26
+ with a deep understanding of tech field,software engineering,data science ,data analyst
27
+ and big data engineer. Your task is to evaluate the resume based on the given job description.
28
+ You must consider the job market is very competitive and you should provide
29
+ best assistance for improving thr resumes. Assign the percentage Matching based
30
+ on Jd and
31
+ the missing keywords with high accuracy
32
+ resume:{text}
33
+ description:{jd}
34
+
35
+ I want the response in one single string having the structure
36
+ {{"JD Match":"%",
37
+ "MissingKeywords:[]",
38
+ "Profile Summary":""}}
39
+ """
40
+
41
+ ## streamlit app
42
+ st.title("Smart Resume ATS")
43
+ st.text("Surat Resume ATS BOTS :books:")
44
+ jd=st.text_area("Paste the Job Description")
45
+ uploaded_file=st.file_uploader("Upload Your Resume",type="pdf",help="Please uplaod the pdf")
46
+
47
+ submit = st.button("Submit")
48
+
49
+ if submit:
50
+ if uploaded_file is not None:
51
+ text=input_pdf_text(uploaded_file)
52
+ response=get_gemini_repsonse(input_prompt)
53
+ st.subheader(response)