Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,6 +12,9 @@ from tools.visit_webpage import VisitWebpageTool
|
|
| 12 |
|
| 13 |
from Gradio_UI import GradioUI
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 16 |
@tool
|
| 17 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
@@ -131,7 +134,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 131 |
|
| 132 |
agent = CodeAgent(
|
| 133 |
model=model,
|
| 134 |
-
tools=[final_answer, my_custom_tool, get_current_time_in_timezone, web_search, visit_webpage,
|
| 135 |
python_tool, image_generation_tool, image_generation_tool2,
|
| 136 |
suggest_menu, catering_service_tool, SuperheroPartyThemeTool()], ## add your tools here (don't remove final answer)
|
| 137 |
max_steps=10,
|
|
|
|
| 12 |
|
| 13 |
from Gradio_UI import GradioUI
|
| 14 |
|
| 15 |
+
from smolagents import WebSearchTool
|
| 16 |
+
search_tool = WebSearchTool()
|
| 17 |
+
|
| 18 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 19 |
@tool
|
| 20 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
|
|
| 134 |
|
| 135 |
agent = CodeAgent(
|
| 136 |
model=model,
|
| 137 |
+
tools=[final_answer, my_custom_tool, get_current_time_in_timezone, web_search, visit_webpage, search_tool,
|
| 138 |
python_tool, image_generation_tool, image_generation_tool2,
|
| 139 |
suggest_menu, catering_service_tool, SuperheroPartyThemeTool()], ## add your tools here (don't remove final answer)
|
| 140 |
max_steps=10,
|