Spaces:
Sleeping
Sleeping
runtime error solved
Browse files
app.py
CHANGED
|
@@ -25,8 +25,8 @@ def get_city_stats(city:str)-> str: #it's import to specify the return type
|
|
| 25 |
population = data[0]["population"]
|
| 26 |
else:
|
| 27 |
print("Error:", response.status_code)
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
|
| 32 |
return f"{city} is part of {country} and has a population of {population}"
|
|
|
|
| 25 |
population = data[0]["population"]
|
| 26 |
else:
|
| 27 |
print("Error:", response.status_code)
|
| 28 |
+
country = "Argentina" #default response
|
| 29 |
+
population = "10000000" #default response
|
| 30 |
|
| 31 |
|
| 32 |
return f"{city} is part of {country} and has a population of {population}"
|