eli-the-pooh commited on
Commit
2bcb87e
·
verified ·
1 Parent(s): 8e9e9d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import Agent, CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
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
- agent = Agent(
 
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)