Spaces:
Runtime error
Runtime error
Update utils/mistral.py
Browse files- utils/mistral.py +17 -17
utils/mistral.py
CHANGED
|
@@ -323,33 +323,33 @@ def process_resume_data(file_path):
|
|
| 323 |
# Combine both personal and professional details into a structured output
|
| 324 |
result = {
|
| 325 |
"personal": {
|
| 326 |
-
"name": per_data.get('personal', {}).get('name',
|
| 327 |
-
"contact": per_data.get('personal', {}).get('contact_number',
|
| 328 |
-
"email": per_data.get('personal', {}).get('email',
|
| 329 |
-
"location": per_data.get('personal', {}).get('Address',
|
| 330 |
"linkedin": linkedin_links,
|
| 331 |
"github": github_links,
|
| 332 |
"other_links": hyperlinks # Store remaining links if needed
|
| 333 |
},
|
| 334 |
"professional": {
|
| 335 |
-
"technical_skills": pro_data.get('professional', {}).get('technical_skills',
|
| 336 |
-
"non_technical_skills": pro_data.get('professional', {}).get('non_technical_skills',
|
| 337 |
-
"tools": pro_data.get('professional', {}).get('tools',
|
| 338 |
"experience": [
|
| 339 |
{
|
| 340 |
-
"company": pro_data.get('professional', {}).get('companies_worked_at',
|
| 341 |
-
"projects": pro_data.get('professional', {}).get('projects',
|
| 342 |
-
"role": pro_data.get('professional', {}).get('worked_as',
|
| 343 |
-
"years": pro_data.get('professional', {}).get('experience',
|
| 344 |
-
"project_experience": pro_data.get('professional', {}).get('projects_experience',
|
| 345 |
}
|
| 346 |
],
|
| 347 |
"education": [
|
| 348 |
{
|
| 349 |
-
"qualification": pro_data.get('professional', {}).get('qualification',
|
| 350 |
-
"university": pro_data.get('professional', {}).get('university',
|
| 351 |
-
"course": pro_data.get('professional', {}).get('course',
|
| 352 |
-
"certificate": pro_data.get('professional', {}).get('certification',
|
| 353 |
}
|
| 354 |
]
|
| 355 |
}
|
|
@@ -358,7 +358,7 @@ def process_resume_data(file_path):
|
|
| 358 |
|
| 359 |
|
| 360 |
#Appending the list if any available as a text
|
| 361 |
-
result['personal']['other_links'] += per_data.get('personal', {}).get('link',
|
| 362 |
|
| 363 |
#Added the validator for details, Validate contact and email
|
| 364 |
valid_contact, invalid_contact, valid_email, invalid_email = validate_contact_email(result['personal'])
|
|
|
|
| 323 |
# Combine both personal and professional details into a structured output
|
| 324 |
result = {
|
| 325 |
"personal": {
|
| 326 |
+
"name": per_data.get('personal', {}).get('name', 'Not found'),
|
| 327 |
+
"contact": per_data.get('personal', {}).get('contact_number', 'Not found'),
|
| 328 |
+
"email": per_data.get('personal', {}).get('email', 'Not found'),
|
| 329 |
+
"location": per_data.get('personal', {}).get('Address', 'Not found'),
|
| 330 |
"linkedin": linkedin_links,
|
| 331 |
"github": github_links,
|
| 332 |
"other_links": hyperlinks # Store remaining links if needed
|
| 333 |
},
|
| 334 |
"professional": {
|
| 335 |
+
"technical_skills": pro_data.get('professional', {}).get('technical_skills', 'Not found'),
|
| 336 |
+
"non_technical_skills": pro_data.get('professional', {}).get('non_technical_skills', 'Not found'),
|
| 337 |
+
"tools": pro_data.get('professional', {}).get('tools', 'Not found'),
|
| 338 |
"experience": [
|
| 339 |
{
|
| 340 |
+
"company": pro_data.get('professional', {}).get('companies_worked_at', 'Not found'),
|
| 341 |
+
"projects": pro_data.get('professional', {}).get('projects', 'Not found'),
|
| 342 |
+
"role": pro_data.get('professional', {}).get('worked_as', 'Not found'),
|
| 343 |
+
"years": pro_data.get('professional', {}).get('experience', 'Not found'),
|
| 344 |
+
"project_experience": pro_data.get('professional', {}).get('projects_experience', 'Not found')
|
| 345 |
}
|
| 346 |
],
|
| 347 |
"education": [
|
| 348 |
{
|
| 349 |
+
"qualification": pro_data.get('professional', {}).get('qualification', 'Not found'),
|
| 350 |
+
"university": pro_data.get('professional', {}).get('university', 'Not found'),
|
| 351 |
+
"course": pro_data.get('professional', {}).get('course', 'Not found'),
|
| 352 |
+
"certificate": pro_data.get('professional', {}).get('certification', 'Not found')
|
| 353 |
}
|
| 354 |
]
|
| 355 |
}
|
|
|
|
| 358 |
|
| 359 |
|
| 360 |
#Appending the list if any available as a text
|
| 361 |
+
result['personal']['other_links'] += per_data.get('personal', {}).get('link', 'Not found')
|
| 362 |
|
| 363 |
#Added the validator for details, Validate contact and email
|
| 364 |
valid_contact, invalid_contact, valid_email, invalid_email = validate_contact_email(result['personal'])
|