Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -37,8 +37,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
37 |
# Code Agent Example: Retrieve Weather Information
|
38 |
def get_weather(city):
|
39 |
import requests
|
40 |
-
|
41 |
-
response = requests.get(
|
42 |
if response.status_code == 200:
|
43 |
data = response.json()
|
44 |
return data.get("weather", "No weather information available")
|
|
|
37 |
# Code Agent Example: Retrieve Weather Information
|
38 |
def get_weather(city):
|
39 |
import requests
|
40 |
+
url = f"https://www.weather.com/v1/location/{city}"
|
41 |
+
response = requests.get(url)
|
42 |
if response.status_code == 200:
|
43 |
data = response.json()
|
44 |
return data.get("weather", "No weather information available")
|