avizard commited on
Commit
e8417b8
1 Parent(s): ec7518a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -21,20 +21,20 @@ def get_openai_response(job_description, resume_text, prompt_type):
21
  """Send a prompt to the OpenAI API including both job description and resume text, and return the response."""
22
  if prompt_type == "evaluation":
23
  prompt = f"""
24
- As an experienced Technical Human Resource Manager, evaluate the following resume against the job description provided:
25
- Job Description: {job_description}
26
- Resume Text: {resume_text}
27
- Based on the job description and resume, provide a professional evaluation on whether the candidate's profile aligns with the role, highlighting the strengths and weaknesses.
28
  """
29
  elif prompt_type == "match_percentage":
30
  prompt = f"""
31
- As a skilled ATS scanner with a deep understanding of data science and ATS functionality, evaluate how well the following resume matches the job description provided:
32
- Job Description: {job_description}
33
- Resume Text: {resume_text}
34
- Estimate the percentage match and list any missing keywords or qualifications.
35
  """
36
-
37
- response = openai.completions.create(
38
  model="gpt-3.5-turbo-instruct",
39
  prompt=prompt,
40
  temperature=0.5,
 
21
  """Send a prompt to the OpenAI API including both job description and resume text, and return the response."""
22
  if prompt_type == "evaluation":
23
  prompt = f"""
24
+ As an experienced Technical Human Resource Manager, you have been tasked with reviewing a candidate's resume in comparison to a specific job description. Below, you will find both the job description and the resume text. Please read through them carefully and provide your professional evaluation.
25
+ Job Description:{job_description}
26
+ Resume Text:{resume_text}
27
+ Based on your expertise, assess how well the candidate's profile aligns with the requirements and expectations of the role. Please highlight the strengths of the applicant that are most relevant to the job, as well as any weaknesses or areas where the candidate does not meet the job requirements. Offer insights into the suitability of the candidate for the position and any recommendations for areas of improvement or further development.
28
  """
29
  elif prompt_type == "match_percentage":
30
  prompt = f"""
31
+ As a skilled ATS scanner with a deep understanding of computer science, tech jobs, and ATS functionality, you are tasked with evaluating a candidate's resume against a specific job description provided below. Your analysis should quantify how well the candidate's profile matches the job requirements.
32
+ Job Description:{job_description}
33
+ Resume Text:{resume_text}
34
+ Please calculate the percentage match between the resume and the job description, indicating the degree to which the candidate meets the job requirements. Begin your response with the percentage match, followed by any critical keywords or qualifications that are missing from the resume. Conclude with your final thoughts on the applicant's suitability for the position, considering the match analysis and any areas where the resume could be improved to better align with the job description.
35
  """
36
+
37
+ response = openai.completions.create(
38
  model="gpt-3.5-turbo-instruct",
39
  prompt=prompt,
40
  temperature=0.5,