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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import MultiStepAgent, CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
@@ -69,11 +69,11 @@ with open("prompts.yaml", 'r') as stream:
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)
 
77
  max_steps=6,
78
  verbosity_level=1,
79
  grammar=None,
 
1
+ from smolagents import 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
+ agent = CodeAgent(
 
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)
76
+ tools_config = {"python_interpeter": {"enabled": False} }
77
  max_steps=6,
78
  verbosity_level=1,
79
  grammar=None,