Skip to content

Generate a simple Node.js project structure for running AI models with Replicate's API

Notifications You must be signed in to change notification settings

replicate/create-replicate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-replicate

⚡️🐢⚡️ Generate a simple Node.js project structure for running AI models with Replicate.

What it does:

  • Creates a directory for your project
  • Lets you specify any public model as a starting point, or defaults to black-forest-labs/flux-dev
  • Adds a package.json file with necessary dependencies like the replicate npm package.
  • Runs npm install
  • Adds a .env file and helps you add your Replicate API token
  • Gitignores the .env file so you keep your secrets out of source control
  • Runs your app with a simple example input

Usage

Make sure you have Node.js 18 or greater installed, then run:

npx create-replicate@latest

You can specify an optional name for your project:

npx create-replicate@latest foo

You can also specify which model you want to use as a starting point. The latest version of the model will be used:

npx create-replicate@latest my-image-interrogator --model=yorickvp/llava-13b

You can also specify a version of the model you want to use:

npx create-replicate@latest my-image-interrogator --model=yorickvp/llava-13b:2cfef05a8e8e648f6e92ddb53fa21a81c04ab2c4f1390a6528cc4e331d608df8