defaultThe capital of France is [MASK].
typetext
{
"prompt": "Replicate lets you run machine learning [MASK] with a cloud API."
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_M5h**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/modernbert-base using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/modernbert-base:06175179e8c4b7cc6166c71c44637ed0d0f325eea8c0f5e652c3ca808b23d11d",
{
input: {
prompt: "Replicate lets you run machine learning [MASK] with a cloud API."
}
}
);
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_M5h**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/modernbert-base using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/modernbert-base:06175179e8c4b7cc6166c71c44637ed0d0f325eea8c0f5e652c3ca808b23d11d",
input={
"prompt": "Replicate lets you run machine learning [MASK] with a cloud API."
}
)
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_M5h**********************************
This is your API token. Keep it to yourself.
Run lucataco/modernbert-base 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": "lucataco/modernbert-base:06175179e8c4b7cc6166c71c44637ed0d0f325eea8c0f5e652c3ca808b23d11d",
"input": {
"prompt": "Replicate lets you run machine learning [MASK] with a cloud API."
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
applications
{
"id": "zzq519dzcsrmc0cm0hm8yegaj0",
"model": "lucataco/modernbert-base",
"version": "06175179e8c4b7cc6166c71c44637ed0d0f325eea8c0f5e652c3ca808b23d11d",
"input": {
"prompt": "Replicate lets you run machine learning [MASK] with a cloud API."
},
"logs": "",
"output": " applications",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-12-26T19:19:21.19Z",
"started_at": "2024-12-26T19:19:21.197205Z",
"completed_at": "2024-12-26T19:19:21.20835Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zzq519dzcsrmc0cm0hm8yegaj0/cancel",
"get": "https://api.replicate.com/v1/predictions/zzq519dzcsrmc0cm0hm8yegaj0",
"web": "https://replicate.com/p/zzq519dzcsrmc0cm0hm8yegaj0"
},
"metrics": {
"predict_time": 0.011144673,
"total_time": 0.01835
}
}