Spaces:
Runtime error
Runtime error
Upload tool
Browse files- python_tool.py +3 -3
- requirements.txt +3 -3
- tool_config.json +2 -2
python_tool.py
CHANGED
@@ -9,9 +9,9 @@ class PythonExecutorToolWithInputs(Tool):
|
|
9 |
name = "python_executor_with_test_inputs"
|
10 |
description = (
|
11 |
"This tool executes Python code with given inputs. It takes a single input containing:"
|
12 |
-
"
|
13 |
-
"
|
14 |
-
"
|
15 |
"For example if there are 2 input funtion calls in the code with first taking 2 arguments and second taking 1:"
|
16 |
"12 43\n94"
|
17 |
"The tool returns the outputs(if multiple or else single) of the executed code as a string."
|
|
|
9 |
name = "python_executor_with_test_inputs"
|
10 |
description = (
|
11 |
"This tool executes Python code with given inputs. It takes a single input containing:"
|
12 |
+
"Python code to execute."
|
13 |
+
"Followed by a line containing only '#inputs' (without quotes)."
|
14 |
+
"Followed by input values, one per line, to be used when the code calls input()."
|
15 |
"For example if there are 2 input funtion calls in the code with first taking 2 arguments and second taking 1:"
|
16 |
"12 43\n94"
|
17 |
"The tool returns the outputs(if multiple or else single) of the executed code as a string."
|
requirements.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
sys
|
2 |
-
importlib
|
3 |
io
|
|
|
4 |
ast
|
5 |
-
transformers
|
6 |
contextlib
|
|
|
|
|
|
|
|
|
|
1 |
io
|
2 |
+
sys
|
3 |
ast
|
|
|
4 |
contextlib
|
5 |
+
transformers
|
6 |
+
importlib
|
tool_config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
-
"description": "This tool executes Python code with given inputs. It takes a single input containing:
|
3 |
"inputs": "['text']",
|
4 |
"name": "python_executor_with_test_inputs",
|
5 |
-
"output_type": "
|
6 |
"tool_class": "python_tool.PythonExecutorToolWithInputs"
|
7 |
}
|
|
|
1 |
{
|
2 |
+
"description": "This tool executes Python code with given inputs. It takes a single input containing:Python code to execute.Followed by a line containing only '#inputs' (without quotes).Followed by input values, one per line, to be used when the code calls input().For example if there are 2 input funtion calls in the code with first taking 2 arguments and second taking 1:12 43\n94The tool returns the outputs(if multiple or else single) of the executed code as a string.",
|
3 |
"inputs": "['text']",
|
4 |
"name": "python_executor_with_test_inputs",
|
5 |
+
"output_type": "['text']",
|
6 |
"tool_class": "python_tool.PythonExecutorToolWithInputs"
|
7 |
}
|