WebashalarForML commited on
Commit
2af0077
·
verified ·
1 Parent(s): b924500

Update utils/mistral.py

Browse files
Files changed (1) hide show
  1. utils/mistral.py +4 -5
utils/mistral.py CHANGED
@@ -344,7 +344,7 @@ def is_valid_contact(contact):
344
  r'\+54\d{9} ', # +54 XXXXXXXXX
345
  r'0\d{7} ', # 0XXXXXXX
346
  r'\+966\d{8} ', # +966 XXXXXXXX
347
- r'0\d{8}' # 0XXXXXXXX
348
  ]
349
 
350
  # Check if the contact matches any of the patterns
@@ -471,9 +471,9 @@ def process_resume_data(file_path):
471
  #Added the validator for details, Validate contact and email
472
  #valid_contact, invalid_contact, valid_email, invalid_email = validate_contact_email(result['personal'])
473
  #result['personal']['valid_contact'] = None
474
- result['personal']['invalid_contact'] = None
475
  #result['personal']['valid_email'] = None
476
- result['personal']['invalid_email'] = None
477
 
478
  #Appending the Educational Details if any available as a text
479
 
@@ -498,5 +498,4 @@ def process_resume_data(file_path):
498
  logging.warning("Mistral failed, switching to SpaCy.")
499
  print("---------SpaCy-------")
500
  return Parser_from_model(file_path)
501
-
502
-
 
344
  r'\+54\d{9} ', # +54 XXXXXXXXX
345
  r'0\d{7} ', # 0XXXXXXX
346
  r'\+966\d{8} ', # +966 XXXXXXXX
347
+ r'0\d{8}' # 0XXXXXXXX
348
  ]
349
 
350
  # Check if the contact matches any of the patterns
 
471
  #Added the validator for details, Validate contact and email
472
  #valid_contact, invalid_contact, valid_email, invalid_email = validate_contact_email(result['personal'])
473
  #result['personal']['valid_contact'] = None
474
+ #result['personal']['invalid_contact'] = None
475
  #result['personal']['valid_email'] = None
476
+ #result['personal']['invalid_email'] = None
477
 
478
  #Appending the Educational Details if any available as a text
479
 
 
498
  logging.warning("Mistral failed, switching to SpaCy.")
499
  print("---------SpaCy-------")
500
  return Parser_from_model(file_path)
501
+