Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import time
|
|
| 3 |
import requests
|
| 4 |
import gradio as gr
|
| 5 |
import pandas as pd
|
| 6 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool,
|
| 7 |
|
| 8 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 9 |
|
|
@@ -12,7 +12,7 @@ class BasicAgent:
|
|
| 12 |
def __init__(self):
|
| 13 |
print("Initializing HuggingFace agent...")
|
| 14 |
|
| 15 |
-
self.model =
|
| 16 |
model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 17 |
token=os.environ.get("HF_TOKEN"),
|
| 18 |
)
|
|
|
|
| 3 |
import requests
|
| 4 |
import gradio as gr
|
| 5 |
import pandas as pd
|
| 6 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, VisitWebpageTool
|
| 7 |
|
| 8 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 9 |
|
|
|
|
| 12 |
def __init__(self):
|
| 13 |
print("Initializing HuggingFace agent...")
|
| 14 |
|
| 15 |
+
self.model = InferenceClientModel(
|
| 16 |
model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 17 |
token=os.environ.get("HF_TOKEN"),
|
| 18 |
)
|