Sauten commited on
Commit
39351b1
·
verified ·
1 Parent(s): 15023ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -5,7 +5,7 @@ import inspect
5
  import pandas as pd
6
  import json
7
 
8
- from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool, FinalAnswerTool, OpenAIServerModel
9
 
10
  # (Keep Constants as is)
11
  # --- Constants ---
@@ -13,9 +13,6 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
13
 
14
  # --- Basic Agent Definition ---
15
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
16
- final_answer = FinalAnswerTool()
17
-
18
- search = DuckDuckGoSearchTool()
19
 
20
  model = OpenAIServerModel(
21
  api_key="fw_3ZSrkw3Qv5eeA1yx65x1eD5H",
@@ -39,11 +36,11 @@ class BasicAgent:
39
 
40
 
41
  agent = CodeAgent(
42
- tools=[final_answer, search],
43
  model=model,
44
- max_steps=5,
45
- verbosity_level=1,
46
- planning_interval=2
47
  )
48
 
49
  # Get the actual answer from the agent
 
5
  import pandas as pd
6
  import json
7
 
8
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool, FinalAnswerTool, OpenAIServerModel, VisitWebpageTool
9
 
10
  # (Keep Constants as is)
11
  # --- Constants ---
 
13
 
14
  # --- Basic Agent Definition ---
15
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
 
 
 
16
 
17
  model = OpenAIServerModel(
18
  api_key="fw_3ZSrkw3Qv5eeA1yx65x1eD5H",
 
36
 
37
 
38
  agent = CodeAgent(
39
+ tools=[FinalAnswerTool(), DuckDuckGoSearchTool(), VisitWebpageTool()],
40
  model=model,
41
+ max_steps=10,
42
+ verbosity_level=2,
43
+ planning_interval=4
44
  )
45
 
46
  # Get the actual answer from the agent