Update app.py
Browse files
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, DuckDuckGoSearchTool, VisitWebpageTool,
|
7 |
|
8 |
# (Keep Constants as is)
|
9 |
# --- Constants ---
|
@@ -14,12 +14,8 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
14 |
class BasicAgent:
|
15 |
def __init__(self):
|
16 |
print("BasicAgent initialized.")
|
17 |
-
model =
|
18 |
-
|
19 |
-
api_key="YOUR_API_KEY",
|
20 |
-
num_ctx=8192,
|
21 |
-
)
|
22 |
-
|
23 |
search_tool = DuckDuckGoSearchTool()
|
24 |
|
25 |
web_tool = VisitWebpageTool()
|
|
|
3 |
import requests
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, VisitWebpageTool, HfApiModel
|
7 |
|
8 |
# (Keep Constants as is)
|
9 |
# --- Constants ---
|
|
|
14 |
class BasicAgent:
|
15 |
def __init__(self):
|
16 |
print("BasicAgent initialized.")
|
17 |
+
model = HfApiModel()
|
18 |
+
|
|
|
|
|
|
|
|
|
19 |
search_tool = DuckDuckGoSearchTool()
|
20 |
|
21 |
web_tool = VisitWebpageTool()
|