Nasma commited on
Commit
8b77aa9
·
verified ·
1 Parent(s): ff81192

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -3
main.py CHANGED
@@ -101,7 +101,8 @@ async def get_data(input_file: UploadFile = File(...)):
101
 
102
  # Call Gemini (or another model) to extract required data
103
  prompt = f"""This is CV data: {text.strip()}
104
- IMPORTANT: The output should be a JSON array! Make Sure the JSON is valid.
 
105
 
106
  Example Output:
107
  [
@@ -116,10 +117,11 @@ async def get_data(input_file: UploadFile = File(...)):
116
  "LinkedIn_link": "LinkedIn link",
117
  "experience": "experience",
118
  "industry": "industry of work",
119
- "skills": "skills(Identify and list specific skills mentioned in both the skills section and inferred from the experience section)",
120
- "positions": ["Job title 1", "Job title 2", "Job title 3"],
121
  "summary": "Generate a summary of the CV, including key qualifications, notable experiences, and relevant skills."
122
  ]
 
123
  """
124
 
125
  response = model_text.generate_content(prompt)
 
101
 
102
  # Call Gemini (or another model) to extract required data
103
  prompt = f"""This is CV data: {text.strip()}
104
+ IMPORTANT: The output must be a valid JSON array with all fields included.
105
+ If any field is missing in the CV, set its value to "not provided in the CV."
106
 
107
  Example Output:
108
  [
 
117
  "LinkedIn_link": "LinkedIn link",
118
  "experience": "experience",
119
  "industry": "industry of work",
120
+ "skills": "skills(Identify and list specific skills mentioned in both the skills section and inferred from the experience section),"formatted as: Skill 1, Skill 2, Skill 3, Skill 4, Skill 5, Skill 6, Skill 7, Skill 8, Skill 9, Skill 10, Skill 11, Skill 12, Skill 13, Skill 14, Skill 15",
121
+ "positions":"Job title 1", "Job title 2", "Job title 3",
122
  "summary": "Generate a summary of the CV, including key qualifications, notable experiences, and relevant skills."
123
  ]
124
+ Ensure that every field is included in the output, even if the CV lacks the corresponding data.
125
  """
126
 
127
  response = model_text.generate_content(prompt)