Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,13 +9,15 @@ from Gradio_UI import GradioUI
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
-
def my_custom_tool(city:str, state:str
|
| 13 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 14 |
"""A tool that fetches the weather for a provided city and state. This tool only works for the united states
|
| 15 |
Args:
|
| 16 |
-
|
|
|
|
| 17 |
"""
|
| 18 |
api_key = "3MfEYSjmLMlWRZCbw7VSLhaGyptxpUYP"
|
|
|
|
| 19 |
|
| 20 |
url_city = f"http://dataservice.accuweather.com/locations/v1/cities/{country}/{state}/search"
|
| 21 |
params = {
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
+
def my_custom_tool(city:str, state:str)-> str: #it's import to specify the return type
|
| 13 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 14 |
"""A tool that fetches the weather for a provided city and state. This tool only works for the united states
|
| 15 |
Args:
|
| 16 |
+
city: name of the city in the united states
|
| 17 |
+
state: name of the state in the united states
|
| 18 |
"""
|
| 19 |
api_key = "3MfEYSjmLMlWRZCbw7VSLhaGyptxpUYP"
|
| 20 |
+
country = "United States"
|
| 21 |
|
| 22 |
url_city = f"http://dataservice.accuweather.com/locations/v1/cities/{country}/{state}/search"
|
| 23 |
params = {
|