Spaces:
Sleeping
Sleeping
Update utils/mistral.py
Browse files- utils/mistral.py +4 -10
utils/mistral.py
CHANGED
@@ -56,12 +56,8 @@ def Model_ProfessionalDetails_Output(resume, client):
|
|
56 |
"companies_worked_at": ["List the names of all companies where employment is mentioned in the resume."],
|
57 |
"projects": ["Extract all projects names or titles mentioned in the resume."],
|
58 |
"projects_experience": ["Summarize overall project experiences, providing a brief description of each project as detailed in the resume."],
|
59 |
-
"experience": ["Calculate total professional work experience in years and months based on the resume."],
|
60 |
-
"
|
61 |
-
"roles": ["List and Extract the names of all job titles or roles mentioned in the resume."],
|
62 |
-
"qualifications": ["List and Extract all educational qualifications, including degrees (e.g., BBA, MBA), their full forms, and associated levels (e.g., undergraduate, postgraduate) from resume. If none are found, return []."],
|
63 |
-
"university": ["List and Extract the name of the University, College, or Institute attended, based on the resume. If not found, return []."],
|
64 |
-
"courses": ["List and Extract the names of completed courses or based on the resume. If none are found, return []."]
|
65 |
}}
|
66 |
}}
|
67 |
output:
|
@@ -130,8 +126,7 @@ def Model_PersonalDetails_Output(resume, client):
|
|
130 |
"name": "Extract the full name based on the resume. If not found, return 'Not found'.",
|
131 |
"contact_number": "Extract the contact number from the resume. If not found, return 'Not found'.",
|
132 |
"email": "Extract the email address from the resume. If not found, return 'Not found'.",
|
133 |
-
"Address": "Extract the Address or address from the resume. If not found, return 'Not found'."
|
134 |
-
"link": ["Extract any relevant links (e.g., portfolio, LinkedIn) from the resume. If not found, return 'Not found'."]
|
135 |
}}
|
136 |
}}
|
137 |
output:
|
@@ -419,8 +414,7 @@ def process_resume_data(file_path):
|
|
419 |
|
420 |
|
421 |
|
422 |
-
#Appending the list if any available as a text
|
423 |
-
result['personal']['other_links'] += per_data.get('personal', {}).get('link', [])
|
424 |
result['personal']['other_links'] += links
|
425 |
#Added the validator for details, Validate contact and email
|
426 |
valid_contact, invalid_contact, valid_email, invalid_email = validate_contact_email(result['personal'])
|
|
|
56 |
"companies_worked_at": ["List the names of all companies where employment is mentioned in the resume."],
|
57 |
"projects": ["Extract all projects names or titles mentioned in the resume."],
|
58 |
"projects_experience": ["Summarize overall project experiences, providing a brief description of each project as detailed in the resume."],
|
59 |
+
"experience": ["Calculate total professional work experience in years and months based on the resume."],
|
60 |
+
"roles": ["List and Extract the names of all job titles or roles mentioned in the resume."]
|
|
|
|
|
|
|
|
|
61 |
}}
|
62 |
}}
|
63 |
output:
|
|
|
126 |
"name": "Extract the full name based on the resume. If not found, return 'Not found'.",
|
127 |
"contact_number": "Extract the contact number from the resume. If not found, return 'Not found'.",
|
128 |
"email": "Extract the email address from the resume. If not found, return 'Not found'.",
|
129 |
+
"Address": "Extract the Address or address from the resume. If not found, return 'Not found'."
|
|
|
130 |
}}
|
131 |
}}
|
132 |
output:
|
|
|
414 |
|
415 |
|
416 |
|
417 |
+
#Appending the list if any available as a text
|
|
|
418 |
result['personal']['other_links'] += links
|
419 |
#Added the validator for details, Validate contact and email
|
420 |
valid_contact, invalid_contact, valid_email, invalid_email = validate_contact_email(result['personal'])
|