You're looking at a specific version of this model. Jump to the model overview.

andreasjansson /exec-python:71853c42

Input schema

The fields you can use to run this model with an API. If you don’t give a value for a field its default value will be used.

Field Type Default value Description
code
string
Python code to execute in a Python 3.12 environment. You have access to the following external packages that you may import: numpy==2.2.4, scipy==1.15.2, pillow==10.4.0, matplotlib==3.10.1, moviepy==2.1.2, opencv-python==4.11.0.86. You also have access to the following command line system packages that you may subprocess to: imagemagick, ffmpeg, sox. Your code will be executed in a temporary directory. Any file outputs should be written to the current working directory. Only files created in this directory will be returned, along with stdout from the script.
file
string
An optional of file that is passed to be used by the code. This file Path can be accessed by your provided code using `FILE` (e.g. `print(FILE.name)`. Note that if a file is to be used in the code it MUST be passed in using the file input (the exec-python model has no other files available on the file system), and accessed through `FILE` in the code.
timeout
integer
300

Min: 1

Max: 600

Script timeout in seconds

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{'properties': {'files': {'additionalProperties': {'format': 'uri',
                                                   'type': 'string'},
                          'title': 'Files',
                          'type': 'object'},
                'text': {'title': 'Text', 'type': 'string'}},
 'title': 'ModelOutput',
 'type': 'object'}