typetext
{
"input": "Hello! Isn't it beautiful out this saturday evening?",
"style": "formal"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HKY**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run creatorrr/styleformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"creatorrr/styleformer:f456e92efe25177a32afd13d1884fb304f96dd6684e97a2404fee34b2949bf15",
{
input: {
input: "Hello! Isn't it beautiful out this saturday evening?",
style: "formal"
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HKY**********************************
This is your API token. Keep it to yourself.
import replicate
Run creatorrr/styleformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"creatorrr/styleformer:f456e92efe25177a32afd13d1884fb304f96dd6684e97a2404fee34b2949bf15",
input={
"input": "Hello! Isn't it beautiful out this saturday evening?",
"style": "formal"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HKY**********************************
This is your API token. Keep it to yourself.
Run creatorrr/styleformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "creatorrr/styleformer:f456e92efe25177a32afd13d1884fb304f96dd6684e97a2404fee34b2949bf15",
"input": {
"input": "Hello! Isn\'t it beautiful out this saturday evening?",
"style": "formal"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Hello, isn't it beautiful out this Saturday evening?
{
"id": "ud7leyfyw5gonk5hguzbpdxzum",
"model": "creatorrr/styleformer",
"version": "f456e92efe25177a32afd13d1884fb304f96dd6684e97a2404fee34b2949bf15",
"input": {
"input": "Hello! Isn't it beautiful out this saturday evening?",
"style": "formal"
},
"logs": "",
"output": "Hello, isn't it beautiful out this Saturday evening?",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2022-08-25T10:06:56.057004Z",
"started_at": "2022-08-25T10:09:28.372689Z",
"completed_at": "2022-08-25T10:10:12.659195Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ud7leyfyw5gonk5hguzbpdxzum/cancel",
"get": "https://api.replicate.com/v1/predictions/ud7leyfyw5gonk5hguzbpdxzum"
},
"metrics": {
"predict_time": 44.286506,
"total_time": 196.602191
}
}