m-ric HF staff commited on
Commit
9eaa08b
·
verified ·
1 Parent(s): f8171a0

Upload tool

Browse files
Files changed (4) hide show
  1. agent.json +8 -8
  2. app.py +3 -4
  3. requirements.txt +2 -2
  4. tools/visit_webpage.py +2 -2
agent.json CHANGED
@@ -35,17 +35,17 @@
35
  "name": null,
36
  "description": null,
37
  "authorized_imports": [
38
- "re",
39
  "itertools",
40
- "time",
41
  "unicodedata",
 
 
42
  "pandas",
43
- "random",
44
- "math",
45
  "collections",
46
- "stat",
47
- "datetime",
48
- "queue",
49
- "statistics"
50
  ]
51
  }
 
35
  "name": null,
36
  "description": null,
37
  "authorized_imports": [
38
+ "datetime",
39
  "itertools",
 
40
  "unicodedata",
41
+ "queue",
42
+ "stat",
43
  "pandas",
44
+ "statistics",
 
45
  "collections",
46
+ "math",
47
+ "time",
48
+ "random",
49
+ "re"
50
  ]
51
  }
app.py CHANGED
@@ -7,9 +7,8 @@ from scripts.final_answer import FinalAnswerTool
7
 
8
 
9
  model = HfApiModel(
10
- model_id='Qwen/Qwen2.5-Coder-32B-Instruct'
11
- custom_role_conversions=None
12
-
13
  )
14
 
15
  web_search = DuckDuckGoSearchTool()
@@ -33,7 +32,7 @@ agent = CodeAgent(
33
 
34
  description=None,
35
 
36
- authorized_imports=['re', 'itertools', 'time', 'unicodedata', 'pandas', 'random', 'math', 'collections', 'stat', 'datetime', 'queue', 'statistics'],
37
 
38
  prompts_path='./prompts.yaml'
39
  )
 
7
 
8
 
9
  model = HfApiModel(
10
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
11
+ custom_role_conversions=None,
 
12
  )
13
 
14
  web_search = DuckDuckGoSearchTool()
 
32
 
33
  description=None,
34
 
35
+ authorized_imports=['datetime', 'itertools', 'unicodedata', 'queue', 'stat', 'pandas', 'statistics', 'collections', 'math', 'time', 'random', 're'],
36
 
37
  prompts_path='./prompts.yaml'
38
  )
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
- duckduckgo_search
2
- requests
3
  pandas
 
4
  smolagents
5
  markdownify
 
 
 
 
1
  pandas
2
+ duckduckgo_search
3
  smolagents
4
  markdownify
5
+ requests
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 markdownify
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"