Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,9 +16,9 @@ def get_weather_at_location(location:str)-> str: #it's import to specify the ret
|
|
| 16 |
location: A string representing a valid city (e.g, 'Houston/Texas').
|
| 17 |
"""
|
| 18 |
try:
|
| 19 |
-
return requests.get(f"https://wttr.in/{location}?
|
| 20 |
-
except
|
| 21 |
-
return f"Error fetching weather for city '{location}'
|
| 22 |
|
| 23 |
@tool
|
| 24 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 16 |
location: A string representing a valid city (e.g, 'Houston/Texas').
|
| 17 |
"""
|
| 18 |
try:
|
| 19 |
+
return requests.get(f"https://wttr.in/{location}?format=3").text
|
| 20 |
+
except Exception as 0:
|
| 21 |
+
return f"Error fetching weather for city '{location}': {str(0)}"
|
| 22 |
|
| 23 |
@tool
|
| 24 |
def get_current_time_in_timezone(timezone: str) -> str:
|