Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,14 +7,14 @@ from smolagents import tool, CodeAgent, HfApiModel, GoogleSearchTool
|
|
| 7 |
OPENWEATHER_API_KEY = os.environ.get("OPENWEATHER_API_KEY")
|
| 8 |
SERPER_API_KEY = os.environ.get("SERPER_API_KEY")
|
| 9 |
|
| 10 |
-
@tool
|
| 11 |
def get_weather(lat: float, lon: float) -> dict | None:
|
| 12 |
"""
|
| 13 |
Fetches current weather data from OpenWeatherMap API using geographic coordinates
|
| 14 |
|
| 15 |
Args:
|
| 16 |
-
lat
|
| 17 |
-
lon
|
| 18 |
|
| 19 |
Returns:
|
| 20 |
dict | None: Weather data dictionary containing:
|
|
|
|
| 7 |
OPENWEATHER_API_KEY = os.environ.get("OPENWEATHER_API_KEY")
|
| 8 |
SERPER_API_KEY = os.environ.get("SERPER_API_KEY")
|
| 9 |
|
| 10 |
+
@tool
|
| 11 |
def get_weather(lat: float, lon: float) -> dict | None:
|
| 12 |
"""
|
| 13 |
Fetches current weather data from OpenWeatherMap API using geographic coordinates
|
| 14 |
|
| 15 |
Args:
|
| 16 |
+
lat: Latitude of the location (-90 to 90)
|
| 17 |
+
lon: Longitude of the location (-180 to 180)
|
| 18 |
|
| 19 |
Returns:
|
| 20 |
dict | None: Weather data dictionary containing:
|