Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,12 @@ from Gradio_UI import GradioUI
|
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
def get_weather(latitude:float, longitude:float)-> str:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
api_url = f"https://api.open-meteo.com/v1/forecast?latitude={latitude}&longitude={longitude}¤t_weather=true"
|
| 14 |
response = requests.get(api_url)
|
| 15 |
if response.status_code == 200:
|
|
|
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
def get_weather(latitude:float, longitude:float)-> str:
|
| 13 |
+
"""A tool returns description of weather by given coordinances
|
| 14 |
+
Args:
|
| 15 |
+
latitude: float value of latitute 49.4310
|
| 16 |
+
longitude: float value of longitude 18.4843
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
api_url = f"https://api.open-meteo.com/v1/forecast?latitude={latitude}&longitude={longitude}¤t_weather=true"
|
| 20 |
response = requests.get(api_url)
|
| 21 |
if response.status_code == 200:
|