Spaces:
Build error
Build error
Upload tool
Browse files- agent.json +7 -7
- app.py +4 -4
- requirements.txt +1 -1
- tools/visit_webpage.py +1 -1
agent.json
CHANGED
@@ -35,17 +35,17 @@
|
|
35 |
"name": null,
|
36 |
"description": null,
|
37 |
"authorized_imports": [
|
38 |
-
"
|
39 |
-
"unicodedata",
|
40 |
-
"collections",
|
41 |
"queue",
|
42 |
"time",
|
43 |
-
"
|
44 |
"stat",
|
45 |
-
"random",
|
46 |
-
"datetime",
|
47 |
"re",
|
|
|
|
|
|
|
48 |
"math",
|
49 |
-
"
|
|
|
50 |
]
|
51 |
}
|
|
|
35 |
"name": null,
|
36 |
"description": null,
|
37 |
"authorized_imports": [
|
38 |
+
"pandas",
|
|
|
|
|
39 |
"queue",
|
40 |
"time",
|
41 |
+
"itertools",
|
42 |
"stat",
|
|
|
|
|
43 |
"re",
|
44 |
+
"unicodedata",
|
45 |
+
"statistics",
|
46 |
+
"random",
|
47 |
"math",
|
48 |
+
"collections",
|
49 |
+
"datetime"
|
50 |
]
|
51 |
}
|
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
|
2 |
from smolagents import GradioUI, CodeAgent, HfApiModel
|
3 |
|
4 |
-
from
|
5 |
-
from
|
6 |
-
from
|
7 |
|
8 |
|
9 |
model = HfApiModel(
|
@@ -25,7 +25,7 @@ agent = CodeAgent(
|
|
25 |
planning_interval=None,
|
26 |
name=None,
|
27 |
description=None,
|
28 |
-
authorized_imports=['
|
29 |
prompts_path='./prompts.yaml'
|
30 |
)
|
31 |
|
|
|
1 |
|
2 |
from smolagents import GradioUI, CodeAgent, HfApiModel
|
3 |
|
4 |
+
from tools.web_search import DuckDuckGoSearchTool
|
5 |
+
from tools.visit_webpage import VisitWebpageTool
|
6 |
+
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
|
9 |
model = HfApiModel(
|
|
|
25 |
planning_interval=None,
|
26 |
name=None,
|
27 |
description=None,
|
28 |
+
authorized_imports=['pandas', 'queue', 'time', 'itertools', 'stat', 're', 'unicodedata', 'statistics', 'random', 'math', 'collections', 'datetime'],
|
29 |
prompts_path='./prompts.yaml'
|
30 |
)
|
31 |
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
smolagents
|
2 |
requests
|
3 |
pandas
|
4 |
markdownify
|
5 |
duckduckgo_search
|
|
|
|
|
|
1 |
requests
|
2 |
pandas
|
3 |
markdownify
|
4 |
duckduckgo_search
|
5 |
+
smolagents
|
tools/visit_webpage.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
from typing import Any, Optional
|
2 |
from smolagents.tools import Tool
|
3 |
import requests
|
4 |
-
import smolagents
|
5 |
import markdownify
|
|
|
6 |
|
7 |
class VisitWebpageTool(Tool):
|
8 |
name = "visit_webpage"
|
|
|
1 |
from typing import Any, Optional
|
2 |
from smolagents.tools import Tool
|
3 |
import requests
|
|
|
4 |
import markdownify
|
5 |
+
import smolagents
|
6 |
|
7 |
class VisitWebpageTool(Tool):
|
8 |
name = "visit_webpage"
|