Youlln commited on
Commit
c7184d7
·
verified ·
1 Parent(s): 6c3dc0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -4,6 +4,9 @@ import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
 
 
 
7
 
8
  from Gradio_UI import GradioUI
9
 
@@ -309,7 +312,11 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
309
 
310
  with open("prompts.yaml", 'r') as stream:
311
  prompt_templates = yaml.safe_load(stream)
312
-
 
 
 
 
313
  agent = CodeAgent(
314
  model=model,
315
  tools=[
@@ -317,7 +324,9 @@ agent = CodeAgent(
317
  task_manager,
318
  timer_tool,
319
  inspiration_generator,
320
- get_current_time_in_timezone
 
 
321
  ], ## add your tools here (don't remove final answer)
322
  max_steps=6,
323
  verbosity_level=1,
 
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
+ # Import vos outils personnalisés
8
+ from tools.visit_webpage import VisitWebpageTool
9
+ from tools.web_search import DuckDuckGoSearchTool
10
 
11
  from Gradio_UI import GradioUI
12
 
 
312
 
313
  with open("prompts.yaml", 'r') as stream:
314
  prompt_templates = yaml.safe_load(stream)
315
+
316
+
317
+ web_search_tool = DuckDuckGoSearchTool(max_results=5) # Vous pouvez ajuster max_results selon vos besoins
318
+ visit_webpage_tool = VisitWebpageTool()
319
+
320
  agent = CodeAgent(
321
  model=model,
322
  tools=[
 
324
  task_manager,
325
  timer_tool,
326
  inspiration_generator,
327
+ get_current_time_in_timezone,
328
+ web_search_tool,
329
+ visit_webpage_tool
330
  ], ## add your tools here (don't remove final answer)
331
  max_steps=6,
332
  verbosity_level=1,