Spaces:
Sleeping
Sleeping
Added web search and image generation tools
Browse files
app.py
CHANGED
|
@@ -24,6 +24,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 24 |
|
| 25 |
|
| 26 |
final_answer = FinalAnswerTool()
|
|
|
|
| 27 |
|
| 28 |
# 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:
|
| 29 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
@@ -44,7 +45,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 44 |
|
| 45 |
agent = CodeAgent(
|
| 46 |
model=model,
|
| 47 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 48 |
max_steps=6,
|
| 49 |
verbosity_level=1,
|
| 50 |
grammar=None,
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
final_answer = FinalAnswerTool()
|
| 27 |
+
web_search = DuckDuckGoSearchTool()
|
| 28 |
|
| 29 |
# 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:
|
| 30 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
|
|
| 45 |
|
| 46 |
agent = CodeAgent(
|
| 47 |
model=model,
|
| 48 |
+
tools=[final_answer, web_search, image_generation_tool], ## add your tools here (don't remove final answer)
|
| 49 |
max_steps=6,
|
| 50 |
verbosity_level=1,
|
| 51 |
grammar=None,
|