z0et commited on
Commit
e3e3bec
·
verified ·
1 Parent(s): 4b1e679

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -37
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
- country_map = {
50
- "United States": "US",
51
- "India": "IN",
52
- "United Kingdom": "GB",
53
- "Germany": "DE",
54
- "France": "FR",
55
- "Canada": "CA",
56
- "Australia": "AU",
57
- "Brazil": "BR",
58
- "China": "CN",
59
- "Japan": "JP",
60
- "Mexico": "MX",
61
- "Russia": "RU",
62
- "South Korea": "KR",
63
- "South Africa": "ZA",
64
- "Italy": "IT",
65
- "Spain": "ES",
66
- "Netherlands": "NL",
67
- "Sweden": "SE",
68
- "Norway": "NO",
69
- "Denmark": "DK",
70
- "Finland": "FI",
71
- "Argentina": "AR",
72
- "Colombia": "CO",
73
- "Turkey": "TR",
74
- "Saudi Arabia": "SA",
75
- "Indonesia": "ID",
76
- "Pakistan": "PK",
77
- "Vietnam": "VN",
78
- "Thailand": "TH",
79
- "Egypt": "EG",
80
- "Philippines": "PH"
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: