Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,8 +66,11 @@ def get_weather_by_location(city: str = None):
|
|
| 66 |
}
|
| 67 |
|
| 68 |
response = requests.post(url, json=payload, headers=headers).json()
|
| 69 |
-
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
def format_weather_response(weather_data, city):
|
| 73 |
"""Format the weather data into a readable string."""
|
|
|
|
| 66 |
}
|
| 67 |
|
| 68 |
response = requests.post(url, json=payload, headers=headers).json()
|
| 69 |
+
response = format_weather_response(response, city)
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
return response
|
| 74 |
|
| 75 |
def format_weather_response(weather_data, city):
|
| 76 |
"""Format the weather data into a readable string."""
|