Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool
|
|
|
|
| 7 |
# (Keep Constants as is)
|
| 8 |
# --- Constants ---
|
| 9 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
@@ -13,10 +14,10 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 13 |
class BasicAgent:
|
| 14 |
def __init__(self):
|
| 15 |
print("BasicAgent initialized.")
|
| 16 |
-
self.model =
|
| 17 |
self.agent = CodeAgent(
|
| 18 |
tools=[DuckDuckGoSearchTool()],
|
| 19 |
-
model=
|
| 20 |
add_base_tools=True # Adds useful tools like image generation/visit web page
|
| 21 |
)
|
| 22 |
def __call__(self, question: str) -> str:
|
|
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool
|
| 7 |
+
from huggingface_hub import InferenceClient
|
| 8 |
# (Keep Constants as is)
|
| 9 |
# --- Constants ---
|
| 10 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 14 |
class BasicAgent:
|
| 15 |
def __init__(self):
|
| 16 |
print("BasicAgent initialized.")
|
| 17 |
+
self.model = InferenceClient()
|
| 18 |
self.agent = CodeAgent(
|
| 19 |
tools=[DuckDuckGoSearchTool()],
|
| 20 |
+
model="deepseek-ai/DeepSeek-R1:novita",
|
| 21 |
add_base_tools=True # Adds useful tools like image generation/visit web page
|
| 22 |
)
|
| 23 |
def __call__(self, question: str) -> str:
|