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, uv==0.7.3. 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. If you provided a zip file, its contents will be extracted to this directory before your code runs. 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.
Optional ZIP file containing code, data, or other files that will be extracted to the execution directory and available to the script.
An optional file to be used by the code. Access via `file1` (of type pathlib.Path) in your code (e.g. `Image.open(file1.name)`). Files must be passed through these inputs as the execution environment has no other file access.
An optional file to be used by the code. Access via `file2` (of type pathlib.Path) in your code (e.g. `Image.open(file2.name)`). Files must be passed through these inputs as the execution environment has no other file access.
An optional file to be used by the code. Access via `file3` (of type pathlib.Path) in your code (e.g. `Image.open(file3.name)`). Files must be passed through these inputs as the execution environment has no other file access.
An optional file to be used by the code. Access via `file4` (of type pathlib.Path) in your code (e.g. `Image.open(file4.name)`). Files must be passed through these inputs as the execution environment has no other file access.
An optional file to be used by the code. Access via `file5` (of type pathlib.Path) in your code (e.g. `Image.open(file5.name)`). Files must be passed through these inputs as the execution environment has no other file access.
List of additional Python package requirements to install with uv
Default: []
List of additional system packages to install with apt-get
Script timeout in seconds
Default: 300
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/exec-python using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/exec-python:b38b9b5f4078d6d9c513cf289e725a90012173a34ce60e5cceb33a83c1b6d932", { input: { timeout: 300, python_packages: [], system_packages: [] } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "andreasjansson/exec-python:b38b9b5f4078d6d9c513cf289e725a90012173a34ce60e5cceb33a83c1b6d932", input={ "timeout": 300, "python_packages": [], "system_packages": [] } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "andreasjansson/exec-python:b38b9b5f4078d6d9c513cf289e725a90012173a34ce60e5cceb33a83c1b6d932", "input": { "timeout": 300, "python_packages": [], "system_packages": [] } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
No output yet! Press "Submit" to start a prediction.
This model runs on CPU hardware. We don't yet have enough runs of this model to provide performance information.
This model doesn't have a readme.
Answers questions about images
Bach chorale generation and harmonization
Age prediction using CLIP
Return CLIP features for the clip-vit-large-patch14 model
An open-source model for program synthesis. Competitive with OpenAI Codex.
CodeLlama 34B with embedding output
CodeLlama-34B-instruct with support for grammars and jsonschema
Simple example of a Cog model that produces Markdown output
The DeepFloyd IF model has been initially released as a non-commercial research-only model. Please make sure you read and abide to the license before using it.
Image similarity metric that that compares a reference image to a set of images.
Suite of models to evaluate the image quality of text-to-image models with respect to their input prompts.
FLUX.1 [dev] trained on the Replicate goo
Flux LoRA trained on generated images of random shapes
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Choose a file from your machine
Hint: you can also drag files onto the input