ByteBrewer commited on
Commit
bcdab1d
1 Parent(s): f7e8d02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +51 -51
app.py CHANGED
@@ -1,52 +1,52 @@
1
- import streamlit as st
2
- from dotenv import load_dotenv
3
-
4
- load_dotenv()
5
-
6
- import os
7
- import PyPDF2 as pdf
8
- import google.generativeai as genai
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
- input_prompt="""
26
- Hey Act Like a skilled or very experience ATS(Application Tracking System)
27
- with a deep understanding of tech field,software engineering,data science ,data analyst
28
- and big data engineer. Your task is to evaluate the resume based on the given job description.
29
- You must consider the job market is very competitive and you should provide
30
- best assistance for improving the resumes. Assign the percentage Matching based
31
- on Jd and
32
- the missing keywords with high accuracy
33
- resume:{text}
34
- description:{jd}
35
-
36
- I want the response in one single string having the structure
37
- {{"JD Match":"%","MissingKeywords:[]","Profile Summary":""}}
38
- """
39
-
40
- ## streamlit app
41
- st.title("Smart ATS")
42
- st.text("Improve Your Resume ATS")
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)
 
1
+ import streamlit as st
2
+ from dotenv import load_dotenv
3
+
4
+ load_dotenv()
5
+
6
+ import os
7
+ import PyPDF2 as pdf
8
+ import google.generativeai as genai
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
+ input_prompt="""
26
+ Hey Act Like a skilled or very experience ATS(Application Tracking System)
27
+ with a deep understanding of tech field,software engineering,data science ,data analyst
28
+ and big data engineer. Your task is to evaluate the resume based on the given job description.
29
+ You must consider the job market is very competitive and you should provide
30
+ best assistance for improving the resumes. Assign the percentage Matching based
31
+ on Jd and
32
+ the missing keywords with high accuracy
33
+ resume:{text}
34
+ description:{jd}
35
+
36
+ I want the response in one single string having the structure
37
+ {{"JD Match":"%","MissingKeywords:[]","Profile Summary":""}}
38
+ """
39
+
40
+ ## streamlit app
41
+ st.title("Smart ATS")
42
+ st.text("Improve Your Resume ATS")
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)