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

andreasjansson /exec-python:a91047d7

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.
file1
string
An optional file that is passed to be used by the code. This file Path can be accessed by your provided code using `file1` (e.g. `Image.open(file1)`. Note that if a file is to be used in the code it MUST be passed in using one of the file inputs (the exec-python model has no other files available on the file system), and accessed through `fileN` in the code.
file2
string
An optional file that is passed to be used by the code. This file Path can be accessed by your provided code using `file1` (e.g. `Image.open(file2)`. Note that if a file is to be used in the code it MUST be passed in using one of the file inputs (the exec-python model has no other files available on the file system), and accessed through `fileN` in the code.
file3
string
An optional file that is passed to be used by the code. This file Path can be accessed by your provided code using `file1` (e.g. `Image.open(file3)`. Note that if a file is to be used in the code it MUST be passed in using one of the file inputs (the exec-python model has no other files available on the file system), and accessed through `fileN` in the code.
file4
string
An optional file that is passed to be used by the code. This file Path can be accessed by your provided code using `file1` (e.g. `Image.open(file4)`. Note that if a file is to be used in the code it MUST be passed in using one of the file inputs (the exec-python model has no other files available on the file system), and accessed through `fileN` in the code.
file5
string
An optional file that is passed to be used by the code. This file Path can be accessed by your provided code using `file1` (e.g. `Image.open(file5)`. Note that if a file is to be used in the code it MUST be passed in using one of the file inputs (the exec-python model has no other files available on the file system), and accessed through `fileN` 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'}