Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -67,9 +67,9 @@ def get_weather(location: str = None, zipcode: int = None) -> str:
|
|
67 |
Returns:
|
68 |
A string describing the weather conditions, temperature, and humidity.
|
69 |
"""
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
|
74 |
return (f"The current Weather in {location,zipcode} is: {conditions.capitalize()}, Temperature: {temperature}°C, Humidity: {humidity}%")
|
75 |
|
|
|
67 |
Returns:
|
68 |
A string describing the weather conditions, temperature, and humidity.
|
69 |
"""
|
70 |
+
temperature = data["main"]["temp"]
|
71 |
+
conditions = data["weather"][0]["description"]
|
72 |
+
humidity = data["main"]["humidity"]
|
73 |
|
74 |
return (f"The current Weather in {location,zipcode} is: {conditions.capitalize()}, Temperature: {temperature}°C, Humidity: {humidity}%")
|
75 |
|