Spaces:
Sleeping
Sleeping
fix
Browse files
app.py
CHANGED
|
@@ -57,13 +57,13 @@ def get_population(country:str)-> str: #it's import to specify the return type
|
|
| 57 |
|
| 58 |
@tool
|
| 59 |
def get_weather(city:str) -> SimpleWeather:
|
| 60 |
-
"""Fetches weather data from WeatherAPI and returns a simplified
|
| 61 |
|
| 62 |
Args:
|
| 63 |
-
city (str): The name of the city.
|
| 64 |
|
| 65 |
Returns:
|
| 66 |
-
SimpleWeather: A dictionary
|
| 67 |
"""
|
| 68 |
API_KEY = os.getenv("WAPI")
|
| 69 |
URL = f"http://api.weatherapi.com/v1/current.json?key={API_KEY}&q={city}&aqi=no"
|
|
|
|
| 57 |
|
| 58 |
@tool
|
| 59 |
def get_weather(city:str) -> SimpleWeather:
|
| 60 |
+
"""Fetches weather data from WeatherAPI and returns a simplified weather report.
|
| 61 |
|
| 62 |
Args:
|
| 63 |
+
city (str): The name of the city to fetch weather data for.
|
| 64 |
|
| 65 |
Returns:
|
| 66 |
+
SimpleWeather: A dictionary containing the city's weather details.
|
| 67 |
"""
|
| 68 |
API_KEY = os.getenv("WAPI")
|
| 69 |
URL = f"http://api.weatherapi.com/v1/current.json?key={API_KEY}&q={city}&aqi=no"
|