Spaces:
Sleeping
Sleeping
File size: 2,070 Bytes
f8ad8be cef8cd5 45902ef f8ad8be 0e80422 f8ad8be 98f8d7a 0e80422 6cbf2a3 f8ad8be 6cbf2a3 0e80422 6cbf2a3 0e80422 6cbf2a3 0e80422 6cbf2a3 0e80422 f8ad8be 0e80422 6cbf2a3 f8ad8be 0e80422 98f8d7a 0e80422 98f8d7a 0e80422 98f8d7a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
import streamlit as st
from cv_evaluator import profile
import logging
import warnings
# Ignore all warnings
warnings.filterwarnings("ignore")
# Set up logging configuration
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
# Streamlit setup
st.header("CV Assistant for Recruiters & Applicants", divider="blue")
# Display the formatted output
st.markdown('''
*Introducing a GenAI-powered app designed to aid the hiring process for both recruiters and applicants.*
- **For Recruiters:** The app automatically analyzes resumes against job descriptions, generates ATS (Applicant Tracking System) compatibility scores, and helps recruiters quickly identify candidates to move forward in the hiring process.
- **For Applicants:** It evaluates resume alignment with the job description, provides actionable recommendations for improvement, and even generates an updated, optimized resume to enhance selection chances.
''')
# User Type Selection
st.subheader("Select your Role ( Recruiter or Applicant)",divider=True)
user_type = st.radio(
" Select anyone :",
options=["Recruiter", "Applicant"]
)
st.subheader("Upload Resume (in PDF form)",divider=True)
pdf_doc = st.file_uploader("Upload Resume in PDF format:", type=['pdf'])
st.subheader("Enter the Job Description 📋", divider=True)
job_desc = st.text_area("Paste the Job Description Below:", max_chars=10000)
if st.button("Invoke CV Assistant"):
try:
logging.info("Processing user input.")
if not pdf_doc:
st.error("Please upload a resume.")
elif not job_desc.strip():
st.error("Please enter the job description.")
else:
# Call profile function with user_type
result = profile(pdf_doc=pdf_doc, job_desc=job_desc, user_type=user_type)
st.markdown(result)
logging.info("Results displayed successfully.")
except Exception as e:
st.error(f"An error occurred: {str(e)}")
logging.error(f"Error processing input: {e}")
|