Spaces:
Sleeping
Sleeping
Muhammed Essam
commited on
Commit
·
b85470f
1
Parent(s):
007b880
Fix: Use correct field names for contact display (full_name_en, title_en)
Browse files
app.py
CHANGED
|
@@ -99,8 +99,9 @@ def format_contact_results(contacts, extracted_names, matched_divisions):
|
|
| 99 |
confidence_pct = contact['confidence'] * 100
|
| 100 |
confidence_bar = "🟢" * int(confidence_pct / 20) + "⚪" * (5 - int(confidence_pct / 20))
|
| 101 |
|
| 102 |
-
|
| 103 |
-
output.append(f"
|
|
|
|
| 104 |
output.append(f" - Division: {contact['division']}")
|
| 105 |
output.append(f" - Department: {contact['department']}")
|
| 106 |
output.append(f" - Phone: {contact['phone']}")
|
|
|
|
| 99 |
confidence_pct = contact['confidence'] * 100
|
| 100 |
confidence_bar = "🟢" * int(confidence_pct / 20) + "⚪" * (5 - int(confidence_pct / 20))
|
| 101 |
|
| 102 |
+
# Use full_name_en (English name) for display
|
| 103 |
+
output.append(f"**{i}. {contact['full_name_en']}** ({contact['full_name_ar']})")
|
| 104 |
+
output.append(f" - Title: {contact['title_en']}")
|
| 105 |
output.append(f" - Division: {contact['division']}")
|
| 106 |
output.append(f" - Department: {contact['department']}")
|
| 107 |
output.append(f" - Phone: {contact['phone']}")
|