Leonardo commited on
Commit
efd1738
·
verified ·
1 Parent(s): ef7a13d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -14
app.py CHANGED
@@ -19,7 +19,6 @@ from scripts.text_web_browser import (
19
  VisitTool,
20
  )
21
  from scripts.visual_qa import visualizer
22
- from scripts.text_cleaner_tool import TextCleanerTool
23
 
24
  from smolagents import (
25
  CodeAgent,
@@ -170,15 +169,6 @@ class ToolRegistry:
170
  print(f"✗ Couldn't initialize image generation tool: {e}")
171
  raise
172
 
173
- @staticmethod
174
- def load_clean_text_tool():
175
- """Initialize and return image generation tools."""
176
- try:
177
- return TextCleanerTool
178
- except Exception as e:
179
- print(f"✗ Couldn't initialize clean text tool: {e}")
180
- raise
181
-
182
 
183
  # ------------------------ Agent Creation and Execution ------------------------
184
  def create_agent():
@@ -186,7 +176,7 @@ def create_agent():
186
  # Initialize model
187
  model = LiteLLMModel(
188
  custom_role_conversions=custom_role_conversions,
189
- model_id="openrouter/deepseek/deepseek-chat-v3-0324:free", # currently serving:
190
  ) # DEEPSEEK = openrouter/perplexity/r1-1776 <--- boss model
191
 
192
  # Initialize tools
@@ -196,10 +186,9 @@ def create_agent():
196
  # Collect all tools in a single list
197
  web_tools = ToolRegistry.load_web_tools(model, browser, text_limit)
198
  image_generator = ToolRegistry.load_image_generation_tools()
199
- clean_text = ToolRegistry.load_clean_text_tool()
200
 
201
  # Combine all tools into a single list (not a tuple)
202
- all_tools = [visualizer, web_tools, image_generator, clean_text]
203
 
204
  # Validate tools before creating agent
205
  for tool in all_tools:
@@ -420,7 +409,7 @@ class GradioUI:
420
  with gr.Sidebar():
421
  gr.Markdown(
422
  """#OpenDeepResearch - 3theSmolagents!
423
- Model_id: deepseek/deepseek-chat-v3-0324:free"""
424
  )
425
  with gr.Group():
426
  gr.Markdown("**What's on your mind mate?**", container=True)
 
19
  VisitTool,
20
  )
21
  from scripts.visual_qa import visualizer
 
22
 
23
  from smolagents import (
24
  CodeAgent,
 
169
  print(f"✗ Couldn't initialize image generation tool: {e}")
170
  raise
171
 
 
 
 
 
 
 
 
 
 
172
 
173
  # ------------------------ Agent Creation and Execution ------------------------
174
  def create_agent():
 
176
  # Initialize model
177
  model = LiteLLMModel(
178
  custom_role_conversions=custom_role_conversions,
179
+ model_id="openrouter/google/gemini-2.0-flash-001", # currently serving:
180
  ) # DEEPSEEK = openrouter/perplexity/r1-1776 <--- boss model
181
 
182
  # Initialize tools
 
186
  # Collect all tools in a single list
187
  web_tools = ToolRegistry.load_web_tools(model, browser, text_limit)
188
  image_generator = ToolRegistry.load_image_generation_tools()
 
189
 
190
  # Combine all tools into a single list (not a tuple)
191
+ all_tools = [visualizer] + web_tools + [image_generator]
192
 
193
  # Validate tools before creating agent
194
  for tool in all_tools:
 
409
  with gr.Sidebar():
410
  gr.Markdown(
411
  """#OpenDeepResearch - 3theSmolagents!
412
+ Model_id: google/gemini-2.0-flash-001"""
413
  )
414
  with gr.Group():
415
  gr.Markdown("**What's on your mind mate?**", container=True)