Spaces:
Paused
Paused
Svetlana commited on
Commit ·
7e97ca8
1
Parent(s): 7cb927e
chore: change model
Browse files- .env.example +1 -2
- agent.py +2 -2
.env.example
CHANGED
|
@@ -1,3 +1,2 @@
|
|
| 1 |
SPACE_ID=
|
| 2 |
-
SPACE_HOST=
|
| 3 |
-
OPENROUTER_KEY=
|
|
|
|
| 1 |
SPACE_ID=
|
| 2 |
+
SPACE_HOST=
|
|
|
agent.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
import os
|
| 4 |
-
from smolagents import DuckDuckGoSearchTool, CodeAgent, WikipediaSearchTool,
|
| 5 |
from tools import DownloadTaskAttachmentTool, VisitWebpageTool
|
| 6 |
|
| 7 |
|
| 8 |
class MyAgent:
|
| 9 |
def __init__(self):
|
| 10 |
self.agent = CodeAgent(
|
| 11 |
-
model=
|
| 12 |
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(), VisitWebpageTool(), DownloadTaskAttachmentTool()],
|
| 13 |
add_base_tools=True,
|
| 14 |
additional_authorized_imports=['pandas', 'numpy', 'csv', 'subprocess', 'exec']
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
import os
|
| 4 |
+
from smolagents import DuckDuckGoSearchTool, CodeAgent, WikipediaSearchTool, HfApiModel
|
| 5 |
from tools import DownloadTaskAttachmentTool, VisitWebpageTool
|
| 6 |
|
| 7 |
|
| 8 |
class MyAgent:
|
| 9 |
def __init__(self):
|
| 10 |
self.agent = CodeAgent(
|
| 11 |
+
model=HfApiModel(),
|
| 12 |
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(), VisitWebpageTool(), DownloadTaskAttachmentTool()],
|
| 13 |
add_base_tools=True,
|
| 14 |
additional_authorized_imports=['pandas', 'numpy', 'csv', 'subprocess', 'exec']
|