Pranay25 commited on
Commit
2bcd44a
·
verified ·
1 Parent(s): d44f1b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,7 +24,7 @@ GENDER_MAPPING = {
24
  "Other": "Others" # Map 'Other' to 'Others' to match picklist
25
  }
26
 
27
- # Salesforce credentials (updated with new values)
28
  SALESFORCE_USERNAME = "sathkruthatech@hms.com"
29
  SALESFORCE_PASSWORD = "Hms@2025"
30
  SALESFORCE_SECURITY_TOKEN = "5W0grf0aX0M9cD3yDZ2C5F"
@@ -49,7 +49,7 @@ def extract_attributes(extracted_text):
49
  "Name": r"Name[:\-]?\s*([A-Za-z]+)", # Allow no space after Name:
50
  "Age": r"Age[:\-]?\s*(\d{1,3})",
51
  "Gender": r"Gender[:\-]?\s*(Male|Female|Other)",
52
- "Phone Number": r"(?:Phone|Mobile|Phonenumber)[:\-]?\s*(\+?\d{10,12})" # Include Phonenumber
53
  }
54
 
55
  for readable_attr, pattern in patterns.items():
 
24
  "Other": "Others" # Map 'Other' to 'Others' to match picklist
25
  }
26
 
27
+ # Salesforce credentials
28
  SALESFORCE_USERNAME = "sathkruthatech@hms.com"
29
  SALESFORCE_PASSWORD = "Hms@2025"
30
  SALESFORCE_SECURITY_TOKEN = "5W0grf0aX0M9cD3yDZ2C5F"
 
49
  "Name": r"Name[:\-]?\s*([A-Za-z]+)", # Allow no space after Name:
50
  "Age": r"Age[:\-]?\s*(\d{1,3})",
51
  "Gender": r"Gender[:\-]?\s*(Male|Female|Other)",
52
+ "Phone Number": r"(?:Phone|Mobile|Phonenumber)[:\-]?\s*(?:\+91)?([6-9]\d{9})" # Indian number: starts with 6-9, exactly 10 digits
53
  }
54
 
55
  for readable_attr, pattern in patterns.items():