Code snippets for every prediction
Posted
Every prediction on the web now includes code snippets for Node.js, Python, and other languages. This makes it easy to tinker with a model on the web, then grab some useable code and run with it.
To view these code snippets, click the language tabs under the Input heading on any model or prediction page:
Clicking one of these language tabs changes the page URL, which means you can also deep link to language-specific snippets for any model:
Here’s a five-minute video showing off how to use this new feature to run a model in the browser, then grab the code to run the model in your own project using Replicate’s API: