huytofu92 commited on
Commit
d812eb3
·
1 Parent(s): a6b9f81

Happy running!

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. mini_agents.py +7 -7
app.py CHANGED
@@ -284,7 +284,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None, mock_submission: bool =
284
  answers_payload = []
285
  df_agent_steps = pd.DataFrame(columns=columns)
286
  print(f"Running agent on {len(questions_data)} questions...")
287
- for item in questions_data[:1]:
288
  task_id = item.get("task_id")
289
  question_text = item.get("question")
290
  file_path = get_full_file_path(task_id)
 
284
  answers_payload = []
285
  df_agent_steps = pd.DataFrame(columns=columns)
286
  print(f"Running agent on {len(questions_data)} questions...")
287
+ for item in questions_data:
288
  task_id = item.get("task_id")
289
  question_text = item.get("question")
290
  file_path = get_full_file_path(task_id)
mini_agents.py CHANGED
@@ -6,7 +6,7 @@ from tools import to_dataframe, to_json, get_dataframe_data, get_dataframe_colum
6
  from vlm_tools import image_processing, object_detection_tool, ocr_scan_tool, extract_images_from_video, get_image_from_file_path, get_video_from_file_path
7
  from audio_tools import transcribe_audio_tool, get_audio_from_file_path, noise_reduction, audio_segmentation, speaker_diarization
8
  from community_tools import community_tools, get_youtube_transcript_from_url
9
- # from browser import browser_manager
10
  import os
11
  import logging
12
  import yaml
@@ -167,10 +167,10 @@ class MasterAgentWrapper:
167
  managed_agents=[audio_agent, vlm_agent, arithmetic_agent, pandas_agent],
168
  tools=self.base_tools, # Initialize without browser tools
169
  add_base_tools=False,
170
- max_steps=8,
171
  additional_authorized_imports=AUTHORIZED_IMPORTS,
172
  verbosity_level=logging.INFO,
173
- planning_interval=4,
174
  prompt_templates=PROMPT_TEMPLATE["master_agent"],
175
  name="master_agent",
176
  description="This agent is responsible for managing audio, vlm, arithmetic and pandas agents."
@@ -199,10 +199,10 @@ class MasterAgentWrapper:
199
  """Run the agent with thread-safe browser tools"""
200
  try:
201
  # Get browser tools in the correct context
202
- # with browser_manager.get_browser_tools() as browser_tools:
203
- # # Run with browser tools
204
- # return self._run_with_browser_tools(question, browser_tools)
205
- return self.master_agent.run(question) # Try without browser tools
206
 
207
  except Exception as e:
208
  logging.error(f"Error in master agent run: {e}")
 
6
  from vlm_tools import image_processing, object_detection_tool, ocr_scan_tool, extract_images_from_video, get_image_from_file_path, get_video_from_file_path
7
  from audio_tools import transcribe_audio_tool, get_audio_from_file_path, noise_reduction, audio_segmentation, speaker_diarization
8
  from community_tools import community_tools, get_youtube_transcript_from_url
9
+ from browser import browser_manager
10
  import os
11
  import logging
12
  import yaml
 
167
  managed_agents=[audio_agent, vlm_agent, arithmetic_agent, pandas_agent],
168
  tools=self.base_tools, # Initialize without browser tools
169
  add_base_tools=False,
170
+ max_steps=16,
171
  additional_authorized_imports=AUTHORIZED_IMPORTS,
172
  verbosity_level=logging.INFO,
173
+ planning_interval=3,
174
  prompt_templates=PROMPT_TEMPLATE["master_agent"],
175
  name="master_agent",
176
  description="This agent is responsible for managing audio, vlm, arithmetic and pandas agents."
 
199
  """Run the agent with thread-safe browser tools"""
200
  try:
201
  # Get browser tools in the correct context
202
+ with browser_manager.get_browser_tools() as browser_tools:
203
+ # Run with browser tools
204
+ return self._run_with_browser_tools(question, browser_tools)
205
+ # return self.master_agent.run(question) # Try without browser tools
206
 
207
  except Exception as e:
208
  logging.error(f"Error in master agent run: {e}")