Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,17 @@ from Gradio_UI import GradioUI
|
|
| 9 |
|
| 10 |
@tool
|
| 11 |
def get_weather(city: str) -> dict:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
import requests
|
| 13 |
|
| 14 |
# 1. Geocodificación: convertir ciudad -> lat/lon
|
|
|
|
| 9 |
|
| 10 |
@tool
|
| 11 |
def get_weather(city: str) -> dict:
|
| 12 |
+
"""
|
| 13 |
+
A tool that fetches the current weather information for a given city.
|
| 14 |
+
|
| 15 |
+
Args:
|
| 16 |
+
city (str): The name of the city to retrieve the weather for.
|
| 17 |
+
|
| 18 |
+
Returns:
|
| 19 |
+
dict: A dictionary containing temperature (°C), windspeed (km/h),
|
| 20 |
+
weather code, and time of the observation.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
import requests
|
| 24 |
|
| 25 |
# 1. Geocodificación: convertir ciudad -> lat/lon
|