Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ def current_weather(location: str)-> str:
|
|
| 25 |
data = response.json()
|
| 26 |
return f"Weather of {location} is {data['current']['weather_descriptions']} with the temperature {data['current']['temperature']}"
|
| 27 |
except Exception as e:
|
| 28 |
-
return f"Error fetching weather for '
|
| 29 |
@tool
|
| 30 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 31 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
|
| 25 |
data = response.json()
|
| 26 |
return f"Weather of {location} is {data['current']['weather_descriptions']} with the temperature {data['current']['temperature']}"
|
| 27 |
except Exception as e:
|
| 28 |
+
return f"Error fetching weather for '{location': str(e)}"
|
| 29 |
@tool
|
| 30 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 31 |
"""A tool that fetches the current local time in a specified timezone.
|