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,11 +69,11 @@ with open("prompts.yaml", 'r') as stream:
|
|
69 |
prompt_templates = yaml.safe_load(stream)
|
70 |
|
71 |
|
72 |
-
|
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,
|