pedrogaprieto commited on
Commit
f0a893b
·
verified ·
1 Parent(s): 0cd4295

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  import requests
4
  import inspect
5
  import pandas as pd
6
- from smolagents import CodeAgent, LiteLLMModel, DuckDuckGoSearchTool
7
 
8
  # (Keep Constants as is)
9
  # --- Constants ---
@@ -13,7 +13,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
13
  # import custom tools to use
14
  from tools import SerperSearchTool
15
 
16
- search_tool = SerperSearchTool()
17
 
18
  # Initialize the watsonx model
19
  llm = LiteLLMModel(
@@ -26,7 +26,7 @@ llm = LiteLLMModel(
26
 
27
  # Create Alfred with all the tools
28
  agent = CodeAgent(
29
- tools=[search_tool],
30
  model=llm,
31
  add_base_tools=True, # Add any additional base tools
32
  planning_interval=3 # Enable planning every 3 steps
 
3
  import requests
4
  import inspect
5
  import pandas as pd
6
+ from smolagents import CodeAgent, LiteLLMModel
7
 
8
  # (Keep Constants as is)
9
  # --- Constants ---
 
13
  # import custom tools to use
14
  from tools import SerperSearchTool
15
 
16
+ web_search_tool = SerperSearchTool()
17
 
18
  # Initialize the watsonx model
19
  llm = LiteLLMModel(
 
26
 
27
  # Create Alfred with all the tools
28
  agent = CodeAgent(
29
+ tools=[web_search_tool],
30
  model=llm,
31
  add_base_tools=True, # Add any additional base tools
32
  planning_interval=3 # Enable planning every 3 steps