Upload tool
Browse files- agent.json +10 -8
- app.py +2 -1
- requirements.txt +2 -2
- tools/visit_webpage.py +1 -1
agent.json
CHANGED
|
@@ -7,6 +7,8 @@
|
|
| 7 |
"model": {
|
| 8 |
"class": "HfApiModel",
|
| 9 |
"data": {
|
|
|
|
|
|
|
| 10 |
"last_input_token_count": null,
|
| 11 |
"last_output_token_count": null,
|
| 12 |
"model_id": "Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
@@ -35,17 +37,17 @@
|
|
| 35 |
"name": null,
|
| 36 |
"description": null,
|
| 37 |
"authorized_imports": [
|
| 38 |
-
"
|
| 39 |
-
"itertools",
|
| 40 |
-
"collections",
|
| 41 |
-
"re",
|
| 42 |
"stat",
|
|
|
|
| 43 |
"random",
|
| 44 |
-
"
|
| 45 |
-
"
|
| 46 |
"math",
|
|
|
|
| 47 |
"queue",
|
| 48 |
-
"
|
| 49 |
-
"
|
|
|
|
| 50 |
]
|
| 51 |
}
|
|
|
|
| 7 |
"model": {
|
| 8 |
"class": "HfApiModel",
|
| 9 |
"data": {
|
| 10 |
+
"max_tokens": 2096,
|
| 11 |
+
"temperature": 0.5,
|
| 12 |
"last_input_token_count": null,
|
| 13 |
"last_output_token_count": null,
|
| 14 |
"model_id": "Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
|
|
| 37 |
"name": null,
|
| 38 |
"description": null,
|
| 39 |
"authorized_imports": [
|
| 40 |
+
"unicodedata",
|
|
|
|
|
|
|
|
|
|
| 41 |
"stat",
|
| 42 |
+
"datetime",
|
| 43 |
"random",
|
| 44 |
+
"pandas",
|
| 45 |
+
"itertools",
|
| 46 |
"math",
|
| 47 |
+
"statistics",
|
| 48 |
"queue",
|
| 49 |
+
"time",
|
| 50 |
+
"collections",
|
| 51 |
+
"re"
|
| 52 |
]
|
| 53 |
}
|
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
|
| 2 |
import yaml
|
| 3 |
-
from pathlib import Path
|
| 4 |
from smolagents import GradioUI, CodeAgent, HfApiModel
|
| 5 |
|
| 6 |
from tools.web_search import DuckDuckGoSearchTool
|
|
@@ -9,6 +8,8 @@ from tools.final_answer import FinalAnswerTool
|
|
| 9 |
|
| 10 |
|
| 11 |
model = HfApiModel(
|
|
|
|
|
|
|
| 12 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
|
| 13 |
custom_role_conversions=None,
|
| 14 |
)
|
|
|
|
| 1 |
|
| 2 |
import yaml
|
|
|
|
| 3 |
from smolagents import GradioUI, CodeAgent, HfApiModel
|
| 4 |
|
| 5 |
from tools.web_search import DuckDuckGoSearchTool
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
model = HfApiModel(
|
| 11 |
+
max_tokens=2096,
|
| 12 |
+
temperature=0.5,
|
| 13 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
|
| 14 |
custom_role_conversions=None,
|
| 15 |
)
|
requirements.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
markdownify
|
| 2 |
-
duckduckgo_search
|
| 3 |
-
requests
|
| 4 |
smolagents
|
|
|
|
|
|
|
| 5 |
pandas
|
|
|
|
| 1 |
markdownify
|
|
|
|
|
|
|
| 2 |
smolagents
|
| 3 |
+
requests
|
| 4 |
+
duckduckgo_search
|
| 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 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"
|