Spaces:
Configuration error
Configuration error
Upload agent
Browse files- agent.json +12 -13
- app.py +3 -4
agent.json
CHANGED
@@ -3,12 +3,11 @@
|
|
3 |
"final_answer"
|
4 |
],
|
5 |
"model": {
|
6 |
-
"class": "
|
7 |
"data": {
|
8 |
-
"last_input_token_count":
|
9 |
-
"last_output_token_count":
|
10 |
-
"model_id": "
|
11 |
-
"provider": null
|
12 |
}
|
13 |
},
|
14 |
"managed_agents": {},
|
@@ -41,17 +40,17 @@
|
|
41 |
"smolagents"
|
42 |
],
|
43 |
"authorized_imports": [
|
44 |
-
"collections",
|
45 |
-
"unicodedata",
|
46 |
-
"statistics",
|
47 |
"time",
|
48 |
-
"
|
49 |
-
"re",
|
50 |
"datetime",
|
51 |
-
"
|
|
|
52 |
"stat",
|
53 |
-
"
|
54 |
-
"
|
|
|
|
|
|
|
55 |
],
|
56 |
"executor_type": "local",
|
57 |
"executor_kwargs": {},
|
|
|
3 |
"final_answer"
|
4 |
],
|
5 |
"model": {
|
6 |
+
"class": "OpenAIServerModel",
|
7 |
"data": {
|
8 |
+
"last_input_token_count": 3856,
|
9 |
+
"last_output_token_count": 158,
|
10 |
+
"model_id": "gpt-3.5-turbo"
|
|
|
11 |
}
|
12 |
},
|
13 |
"managed_agents": {},
|
|
|
40 |
"smolagents"
|
41 |
],
|
42 |
"authorized_imports": [
|
|
|
|
|
|
|
43 |
"time",
|
44 |
+
"queue",
|
|
|
45 |
"datetime",
|
46 |
+
"math",
|
47 |
+
"collections",
|
48 |
"stat",
|
49 |
+
"statistics",
|
50 |
+
"random",
|
51 |
+
"re",
|
52 |
+
"itertools",
|
53 |
+
"unicodedata"
|
54 |
],
|
55 |
"executor_type": "local",
|
56 |
"executor_kwargs": {},
|
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import yaml
|
2 |
import os
|
3 |
-
from smolagents import GradioUI, CodeAgent,
|
4 |
|
5 |
# Get current directory path
|
6 |
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
@@ -9,9 +9,8 @@ from tools.final_answer import FinalAnswerTool as FinalAnswer
|
|
9 |
|
10 |
|
11 |
|
12 |
-
model =
|
13 |
-
model_id='
|
14 |
-
provider=None,
|
15 |
)
|
16 |
|
17 |
final_answer = FinalAnswer()
|
|
|
1 |
import yaml
|
2 |
import os
|
3 |
+
from smolagents import GradioUI, CodeAgent, OpenAIServerModel
|
4 |
|
5 |
# Get current directory path
|
6 |
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
9 |
|
10 |
|
11 |
|
12 |
+
model = OpenAIServerModel(
|
13 |
+
model_id='gpt-3.5-turbo',
|
|
|
14 |
)
|
15 |
|
16 |
final_answer = FinalAnswer()
|