yinde commited on
Commit
8f1f706
·
verified ·
1 Parent(s): 0930b02

Update app.py

Browse files

added image to the object detection tool.

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -119,12 +119,15 @@ custom_role_conversions=None,
119
  # Import tool from Hub
120
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
121
 
 
 
 
122
  with open("prompts.yaml", 'r') as stream:
123
  prompt_templates = yaml.safe_load(stream)
124
 
125
  agent = CodeAgent(
126
  model=model,
127
- tools=[DuckDuckGoSearchTool(), final_answer], ## add your tools here (don't remove final answer)
128
  max_steps=6,
129
  verbosity_level=1,
130
  grammar=None,
 
119
  # Import tool from Hub
120
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
121
 
122
+ #Initialise the simple object detection tool
123
+ object_detection = simple_object_detection("00000001_011.jpg", 0.2)
124
+
125
  with open("prompts.yaml", 'r') as stream:
126
  prompt_templates = yaml.safe_load(stream)
127
 
128
  agent = CodeAgent(
129
  model=model,
130
+ tools=[object_detection, DuckDuckGoSearchTool(), final_answer], ## add your tools here (don't remove final answer)
131
  max_steps=6,
132
  verbosity_level=1,
133
  grammar=None,