m-ric HF staff commited on
Commit
98b4c5c
·
verified ·
1 Parent(s): 8c01ffb

Upload tool

Browse files
Files changed (4) hide show
  1. agent.json +8 -8
  2. app.py +1 -4
  3. requirements.txt +2 -2
  4. tools/visit_webpage.py +1 -1
agent.json CHANGED
@@ -35,17 +35,17 @@
35
  "name": null,
36
  "description": null,
37
  "authorized_imports": [
38
- "collections",
39
- "itertools",
40
  "statistics",
 
41
  "stat",
42
- "random",
43
- "math",
44
- "pandas",
45
- "datetime",
46
  "queue",
47
- "re",
 
 
48
  "unicodedata",
49
- "time"
 
 
 
50
  ]
51
  }
 
35
  "name": null,
36
  "description": null,
37
  "authorized_imports": [
 
 
38
  "statistics",
39
+ "re",
40
  "stat",
 
 
 
 
41
  "queue",
42
+ "datetime",
43
+ "collections",
44
+ "itertools",
45
  "unicodedata",
46
+ "random",
47
+ "time",
48
+ "math",
49
+ "pandas"
50
  ]
51
  }
app.py CHANGED
@@ -1,11 +1,8 @@
1
 
2
  from smolagents import GradioUI, CodeAgent, HfApiModel
3
 
4
-
5
  from scripts.web_search import DuckDuckGoSearchTool
6
-
7
  from scripts.visit_webpage import VisitWebpageTool
8
-
9
  from scripts.final_answer import FinalAnswerTool
10
 
11
 
@@ -35,7 +32,7 @@ agent = CodeAgent(
35
 
36
  description=None,
37
 
38
- authorized_imports=['collections', 'itertools', 'statistics', 'stat', 'random', 'math', 'pandas', 'datetime', 'queue', 're', 'unicodedata', 'time'],
39
 
40
  prompts_path='./prompts.yaml'
41
  )
 
1
 
2
  from smolagents import GradioUI, CodeAgent, HfApiModel
3
 
 
4
  from scripts.web_search import DuckDuckGoSearchTool
 
5
  from scripts.visit_webpage import VisitWebpageTool
 
6
  from scripts.final_answer import FinalAnswerTool
7
 
8
 
 
32
 
33
  description=None,
34
 
35
+ authorized_imports=['statistics', 're', 'stat', 'queue', 'datetime', 'collections', 'itertools', 'unicodedata', 'random', 'time', 'math', 'pandas'],
36
 
37
  prompts_path='./prompts.yaml'
38
  )
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  markdownify
2
- requests
3
- pandas
4
  duckduckgo_search
 
5
  smolagents
 
 
1
  markdownify
 
 
2
  duckduckgo_search
3
+ requests
4
  smolagents
5
+ pandas
tools/visit_webpage.py CHANGED
@@ -1,8 +1,8 @@
1
  from typing import Any, Optional
2
  from smolagents.tools import Tool
 
3
  import markdownify
4
  import requests
5
- import smolagents
6
 
7
  class VisitWebpageTool(Tool):
8
  name = "visit_webpage"
 
1
  from typing import Any, Optional
2
  from smolagents.tools import Tool
3
+ import smolagents
4
  import markdownify
5
  import requests
 
6
 
7
  class VisitWebpageTool(Tool):
8
  name = "visit_webpage"