Spaces:
Build error
Build error
Upload 2 files
Browse filesFiles changed (2)
- app.pyAdded+56
- requirements.txtAdded+4
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556import streamlit as stimport google.generativeai as genaiimport osimport PyPDF2 as pdffrom dotenv import load_dotenvimport json
load_dotenv() ## load all our environment variables
genai.configure(api_key=os.getenv("GOOGLE_API_KEYS"))
def get_gemini_repsonse(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
#Prompt Template
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 analystand 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 thr resumes. Assign the percentage Matching based on Jd andthe missing keywords with high accuracyresume:{text}description:{jd}
I want the response in Three blocks having the structureJD Match:"%"MissingKeywords:[]Tips to Improe the Resume for Higher Match :""}}"""
## streamlit appst.title("DDS Smart ATS")st.text("Improve Your Resume ATS Score Match")jd=st.text_area("Paste the Job Description")uploaded_file=st.file_uploader("Upload Your Resume",type="pdf",help="Please uplaod the pdf")
submit = st.button("Submit")
if submit: if uploaded_file is not None: text=input_pdf_text(uploaded_file) response=get_gemini_repsonse(input_prompt) st.subheader(response)1234streamlitPyPDF2google.generativeaipython-dotenvapp.pyAdded+56
requirements.txtAdded+4