Spaces:
Sleeping
Sleeping
Added DuckDuckGoSearchTool
Browse files
app.py
CHANGED
|
@@ -66,6 +66,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 66 |
|
| 67 |
|
| 68 |
final_answer = FinalAnswerTool()
|
|
|
|
| 69 |
|
| 70 |
# 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:
|
| 71 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
@@ -86,7 +87,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 86 |
|
| 87 |
agent = CodeAgent(
|
| 88 |
model=model,
|
| 89 |
-
tools=[get_current_time_in_timezone, get_current_weather, image_generation_tool, final_answer], ## add your tools here (don't remove final answer)
|
| 90 |
max_steps=6,
|
| 91 |
verbosity_level=1,
|
| 92 |
grammar=None,
|
|
|
|
| 66 |
|
| 67 |
|
| 68 |
final_answer = FinalAnswerTool()
|
| 69 |
+
search_tool = DuckDuckGoSearchTool()
|
| 70 |
|
| 71 |
# 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:
|
| 72 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
|
|
| 87 |
|
| 88 |
agent = CodeAgent(
|
| 89 |
model=model,
|
| 90 |
+
tools=[get_current_time_in_timezone, get_current_weather, image_generation_tool, search_tool, final_answer], ## add your tools here (don't remove final answer)
|
| 91 |
max_steps=6,
|
| 92 |
verbosity_level=1,
|
| 93 |
grammar=None,
|