Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,43 +45,41 @@ def get_most_common_name_in_a_country(country: str) -> str:
|
|
| 45 |
Returns:
|
| 46 |
A string containing the most common first name in that country.
|
| 47 |
"""
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
country_code = country_map.get(country)
|
| 85 |
if not country_code:
|
| 86 |
return f"Sorry, I don't have data for {country}."
|
| 87 |
|
|
@@ -98,6 +96,7 @@ country_code = country_map.get(country)
|
|
| 98 |
return f"Error fetching name data: {str(e)}"
|
| 99 |
|
| 100 |
|
|
|
|
| 101 |
final_answer = FinalAnswerTool()
|
| 102 |
|
| 103 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
|
|
|
| 45 |
Returns:
|
| 46 |
A string containing the most common first name in that country.
|
| 47 |
"""
|
| 48 |
+
country_map = {
|
| 49 |
+
"United States": "US",
|
| 50 |
+
"India": "IN",
|
| 51 |
+
"United Kingdom": "GB",
|
| 52 |
+
"Germany": "DE",
|
| 53 |
+
"France": "FR",
|
| 54 |
+
"Canada": "CA",
|
| 55 |
+
"Australia": "AU",
|
| 56 |
+
"Brazil": "BR",
|
| 57 |
+
"China": "CN",
|
| 58 |
+
"Japan": "JP",
|
| 59 |
+
"Mexico": "MX",
|
| 60 |
+
"Russia": "RU",
|
| 61 |
+
"South Korea": "KR",
|
| 62 |
+
"South Africa": "ZA",
|
| 63 |
+
"Italy": "IT",
|
| 64 |
+
"Spain": "ES",
|
| 65 |
+
"Netherlands": "NL",
|
| 66 |
+
"Sweden": "SE",
|
| 67 |
+
"Norway": "NO",
|
| 68 |
+
"Denmark": "DK",
|
| 69 |
+
"Finland": "FI",
|
| 70 |
+
"Argentina": "AR",
|
| 71 |
+
"Colombia": "CO",
|
| 72 |
+
"Turkey": "TR",
|
| 73 |
+
"Saudi Arabia": "SA",
|
| 74 |
+
"Indonesia": "ID",
|
| 75 |
+
"Pakistan": "PK",
|
| 76 |
+
"Vietnam": "VN",
|
| 77 |
+
"Thailand": "TH",
|
| 78 |
+
"Egypt": "EG",
|
| 79 |
+
"Philippines": "PH"
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
country_code = country_map.get(country)
|
|
|
|
|
|
|
| 83 |
if not country_code:
|
| 84 |
return f"Sorry, I don't have data for {country}."
|
| 85 |
|
|
|
|
| 96 |
return f"Error fetching name data: {str(e)}"
|
| 97 |
|
| 98 |
|
| 99 |
+
|
| 100 |
final_answer = FinalAnswerTool()
|
| 101 |
|
| 102 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|