Spaces:
Sleeping
Sleeping
Fix the coordinate fetching
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ def sunrise_sunset_tool(city:str)-> str: #it's import to specify the return type
|
|
| 23 |
city: A string representing location name
|
| 24 |
"""
|
| 25 |
try:
|
| 26 |
-
lat, lng = get_city_coordinates()
|
| 27 |
api_url = "https://api.sunrise-sunset.org/json"
|
| 28 |
payload = {'lat': lat, 'lng': lng}
|
| 29 |
ret = requests.get(api_url, params=payload)
|
|
|
|
| 23 |
city: A string representing location name
|
| 24 |
"""
|
| 25 |
try:
|
| 26 |
+
lat, lng = get_city_coordinates(city)
|
| 27 |
api_url = "https://api.sunrise-sunset.org/json"
|
| 28 |
payload = {'lat': lat, 'lng': lng}
|
| 29 |
ret = requests.get(api_url, params=payload)
|