Spaces:
Sleeping
Sleeping
clementmandron
commited on
Commit
·
23e170c
1
Parent(s):
dc442fc
update
Browse files
app.py
CHANGED
@@ -9,7 +9,6 @@ from tools.web_search import DuckDuckGoSearchTool
|
|
9 |
|
10 |
from Gradio_UI import GradioUI
|
11 |
|
12 |
-
|
13 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
14 |
@tool
|
15 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
@@ -38,6 +37,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
38 |
|
39 |
|
40 |
final_answer = FinalAnswerTool()
|
|
|
41 |
|
42 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
43 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
@@ -58,7 +58,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
58 |
|
59 |
agent = CodeAgent(
|
60 |
model=model,
|
61 |
-
tools=[final_answer, image_generation_tool,
|
62 |
max_steps=6,
|
63 |
verbosity_level=1,
|
64 |
grammar=None,
|
|
|
9 |
|
10 |
from Gradio_UI import GradioUI
|
11 |
|
|
|
12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
13 |
@tool
|
14 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
|
37 |
|
38 |
|
39 |
final_answer = FinalAnswerTool()
|
40 |
+
web_search = DuckDuckGoSearchTool()
|
41 |
|
42 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
43 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
|
58 |
|
59 |
agent = CodeAgent(
|
60 |
model=model,
|
61 |
+
tools=[final_answer, image_generation_tool, web_search], ## add your tools here (don't remove final answer)
|
62 |
max_steps=6,
|
63 |
verbosity_level=1,
|
64 |
grammar=None,
|