rmjones commited on
Commit
9fa257c
·
verified ·
1 Parent(s): f6858f4

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -7
agent.py CHANGED
@@ -5,8 +5,6 @@ import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
 
8
- from Gradio_UI import GradioUI
9
-
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
  def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
@@ -53,7 +51,7 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
53
  with open("prompts.yaml", 'r') as stream:
54
  prompt_templates = yaml.safe_load(stream)
55
 
56
- agent = CodeAgent(
57
  model=model,
58
  tools=[final_answer, get_current_time_in_timezone, DuckDuckGoSearchTool], ## add your tools here (don't remove final answer)
59
  max_steps=6,
@@ -63,7 +61,4 @@ agent = CodeAgent(
63
  name=None,
64
  description=None,
65
  prompt_templates=prompt_templates
66
- )
67
-
68
-
69
- GradioUI(agent).launch()
 
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
 
 
 
8
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
9
  @tool
10
  def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
 
51
  with open("prompts.yaml", 'r') as stream:
52
  prompt_templates = yaml.safe_load(stream)
53
 
54
+ BasicAgent = CodeAgent(
55
  model=model,
56
  tools=[final_answer, get_current_time_in_timezone, DuckDuckGoSearchTool], ## add your tools here (don't remove final answer)
57
  max_steps=6,
 
61
  name=None,
62
  description=None,
63
  prompt_templates=prompt_templates
64
+ )