Joanna30 commited on
Commit
08eb36e
·
verified ·
1 Parent(s): e8914de

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +8 -10
model.py CHANGED
@@ -11,20 +11,18 @@ genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
11
  # Initialize the generative model
12
  model = genai.GenerativeModel("gemini-pro")
13
 
14
- def modelFeedback(ats_score, resume_data):
15
  # Create the input prompt template
16
  input_prompt_template = """
17
- You are an HR Screening for Resumes.
18
- The ATS score for the resume is {ats_score}.
19
- Provide a relevant summary (up to 150 words) for the following resume based on this score:
20
- {resume_data}
 
21
  """
22
- # Format the prompt with ATS score and resume data
23
- input_prompt = input_prompt_template.format(ats_score=ats_score, resume_data=resume_data)
24
 
25
  # Generate response
26
  response = model.generate_content(input_prompt)
27
-
28
- # Return response text
29
  return response.text
30
-
 
11
  # Initialize the generative model
12
  model = genai.GenerativeModel("gemini-pro")
13
 
14
+ def modelFeedback(ats_score, resume_data, missing_skills):
15
  # Create the input prompt template
16
  input_prompt_template = """
17
+ You are an HR assistant reviewing resumes. The ATS score for the resume is {ats_score}.
18
+ Provide a professional summary for the resume and suggest improvements:
19
+ - Include the strengths of the resume.
20
+ - Highlight the following missing skills to improve ATS performance: {missing_skills}.
21
+ Resume Content: {resume_data}
22
  """
23
+ # Format the prompt with ATS score, missing skills, and resume data
24
+ input_prompt = input_prompt_template.format(ats_score=ats_score, resume_data=resume_data, missing_skills=", ".join(missing_skills))
25
 
26
  # Generate response
27
  response = model.generate_content(input_prompt)
 
 
28
  return response.text