Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from smolagents import
|
2 |
import datetime
|
3 |
import requests
|
4 |
import pytz
|
@@ -69,7 +69,8 @@ with open("prompts.yaml", 'r') as stream:
|
|
69 |
prompt_templates = yaml.safe_load(stream)
|
70 |
|
71 |
|
72 |
-
|
|
|
73 |
model=model,
|
74 |
# If you remove the locally defined python_interpreter from the list the agent will have access to the real python_interpreter
|
75 |
tools=[final_answer, image_generation_tool, get_current_time_in_timezone, my_custom_tool, python_interpreter], ## add your tools here (don't remove final answer)
|
|
|
1 |
+
from smolagents import MultiStepAgent, CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
2 |
import datetime
|
3 |
import requests
|
4 |
import pytz
|
|
|
69 |
prompt_templates = yaml.safe_load(stream)
|
70 |
|
71 |
|
72 |
+
# If you use CodeAgent the python_interpreter will be accessible even with our dummy tool added
|
73 |
+
agent = MultiStepAgent(
|
74 |
model=model,
|
75 |
# If you remove the locally defined python_interpreter from the list the agent will have access to the real python_interpreter
|
76 |
tools=[final_answer, image_generation_tool, get_current_time_in_timezone, my_custom_tool, python_interpreter], ## add your tools here (don't remove final answer)
|