Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,16 @@ from Gradio_UI import GradioUI
|
|
8 |
|
9 |
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
@tool
|
13 |
def calculator(a: int, b: int) -> int:
|
@@ -64,6 +74,7 @@ agent = CodeAgent(
|
|
64 |
name=None,
|
65 |
description=None,
|
66 |
prompt_templates=prompt_templates
|
|
|
67 |
)
|
68 |
|
69 |
|
|
|
8 |
|
9 |
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity!
|
11 |
+
@tool
|
12 |
+
def fetch_weather(city: str) -> str:
|
13 |
+
"""
|
14 |
+
Fetches the current weather for a specified city.
|
15 |
+
Args:
|
16 |
+
city: The name of the city to retreive weather information for.
|
17 |
+
"""
|
18 |
+
#Implementation to fetch weather data for the given city
|
19 |
+
return f"The current wheather in {city} is sunny."
|
20 |
+
|
21 |
|
22 |
@tool
|
23 |
def calculator(a: int, b: int) -> int:
|
|
|
74 |
name=None,
|
75 |
description=None,
|
76 |
prompt_templates=prompt_templates
|
77 |
+
additional_authorized_imports=['requests', 'bs4']
|
78 |
)
|
79 |
|
80 |
|