SahithiNallani's picture
Upload 2 files
cf70891 verified
import streamlit as st
import google.generativeai as genai
import os
import PyPDF2 as pdf
genai.configure(api_key="AIzaSyBk3kTV9PURCS40ZOXNFBMIUMPi08akJME")
# Gemini Pro Response
def get_gemini_response(input):
model=genai.GenerativeModel('gemini-pro')
response=model.generate_content(input)
return response.text
def input_pdf_text(uploaded_file):
reader=pdf.PdfReader(uploaded_file)
text=""
for page in range(len(reader.pages)):
page=reader.pages[page]
text+=str(page.extract_text())
return text
input_prompt="""
Hey Act Like a skilled or very experience ATS(Application Tracking System)
with a deep understanding of tech field,software engineering,data science ,data analyst
and big data engineer. Your task is to evaluate the resume based on the given job description.
You must consider the job market is very competitive and you should provide
best assistance for improving the resumes. Assign the percentage Matching based
on Jd and
the missing keywords with high accuracy
resume:{text}
description:{jd}
I want the response in one single string having the structure
{{"JD Match":"%"}}
"""
## streamlit app
st.title("Smart Resume ATS")
st.text("Improve Your Resume as per Job description ATS")
jd=st.text_area("Paste the Job Description here")
uploaded_file=st.file_uploader("Upload Your Resume",type="pdf",help="Please upload the pdf")
submit = st.button("Submit")
if submit:
if uploaded_file is not None:
text=input_pdf_text(uploaded_file)
response=get_gemini_response(input_prompt)
st.subheader(response)