typefile
{
"clip_model_name": "ViT-L-14/openai",
"image": "https://replicate.delivery/pbxt/IXKj9iZhNzIuulOaqBOBmlLO94hZpd25Yfb4Oebei1sS4PdC/woodblock-print-vst-sensememory-teeth-falling-out-the-dreamer-s-teeth-are-replaced-by-new-stronger-ones-representing-personal-transformation-self-acceptance-and-the-ability-to-over-2642157147.png",
"mode": "best"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_QGr**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run pharmapsychotic/clip-interrogator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"pharmapsychotic/clip-interrogator:a4a8bafd6089e1716b06057c42b19378250d008b80fe87caa5cd36d40c1eda90",
{
input: {
clip_model_name: "ViT-L-14/openai",
image: "https://replicate.delivery/pbxt/IXKj9iZhNzIuulOaqBOBmlLO94hZpd25Yfb4Oebei1sS4PdC/woodblock-print-vst-sensememory-teeth-falling-out-the-dreamer-s-teeth-are-replaced-by-new-stronger-ones-representing-personal-transformation-self-acceptance-and-the-ability-to-over-2642157147.png",
mode: "best"
}
}
);
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_QGr**********************************
This is your API token. Keep it to yourself.
import replicate
Run pharmapsychotic/clip-interrogator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pharmapsychotic/clip-interrogator:a4a8bafd6089e1716b06057c42b19378250d008b80fe87caa5cd36d40c1eda90",
input={
"clip_model_name": "ViT-L-14/openai",
"image": "https://replicate.delivery/pbxt/IXKj9iZhNzIuulOaqBOBmlLO94hZpd25Yfb4Oebei1sS4PdC/woodblock-print-vst-sensememory-teeth-falling-out-the-dreamer-s-teeth-are-replaced-by-new-stronger-ones-representing-personal-transformation-self-acceptance-and-the-ability-to-over-2642157147.png",
"mode": "best"
}
)
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_QGr**********************************
This is your API token. Keep it to yourself.
Run pharmapsychotic/clip-interrogator 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": "pharmapsychotic/clip-interrogator:a4a8bafd6089e1716b06057c42b19378250d008b80fe87caa5cd36d40c1eda90",
"input": {
"clip_model_name": "ViT-L-14/openai",
"image": "https://replicate.delivery/pbxt/IXKj9iZhNzIuulOaqBOBmlLO94hZpd25Yfb4Oebei1sS4PdC/woodblock-print-vst-sensememory-teeth-falling-out-the-dreamer-s-teeth-are-replaced-by-new-stronger-ones-representing-personal-transformation-self-acceptance-and-the-ability-to-over-2642157147.png",
"mode": "best"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
a close up of a painting of a woman's face, a screenprint, by Barbara Nessim, behance, art & language, large gaping mouth, james gilleard and james jean, larynx, new yorker illustration, clipart, breaking apart, exasperated, pleasure, sinew
{
"id": "5uefhn7pznaxthsa6hlqkjdk2u",
"model": "pharmapsychotic/clip-interrogator",
"version": "a4a8bafd6089e1716b06057c42b19378250d008b80fe87caa5cd36d40c1eda90",
"input": {
"clip_model_name": "ViT-L-14/openai",
"image": "https://replicate.delivery/pbxt/IXKj9iZhNzIuulOaqBOBmlLO94hZpd25Yfb4Oebei1sS4PdC/woodblock-print-vst-sensememory-teeth-falling-out-the-dreamer-s-teeth-are-replaced-by-new-stronger-ones-representing-personal-transformation-self-acceptance-and-the-ability-to-over-2642157147.png",
"mode": "best"
},
"logs": "0%| | 0/50 [00:00<?, ?it/s]\n 28%|██▊ | 14/50 [00:00<00:00, 131.90it/s]\n 56%|█████▌ | 28/50 [00:00<00:00, 129.29it/s]\n 82%|████████▏ | 41/50 [00:00<00:00, 125.25it/s]\n100%|██████████| 50/50 [00:00<00:00, 129.36it/s]\n 0%| | 0/6 [00:00<?, ?it/s]\n100%|██████████| 6/6 [00:00<00:00, 68.88it/s]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 38.26it/s]\nFlavor chain: 0%| | 0/32 [00:00<?, ?it/s]\nFlavor chain: 3%|▎ | 1/32 [00:03<01:37, 3.15s/it]\nFlavor chain: 6%|▋ | 2/32 [00:06<01:36, 3.21s/it]\nFlavor chain: 9%|▉ | 3/32 [00:09<01:35, 3.29s/it]\nFlavor chain: 12%|█▎ | 4/32 [00:13<01:33, 3.32s/it]\nFlavor chain: 16%|█▌ | 5/32 [00:16<01:30, 3.37s/it]\nFlavor chain: 19%|█▉ | 6/32 [00:20<01:29, 3.43s/it]\nFlavor chain: 22%|██▏ | 7/32 [00:23<01:25, 3.43s/it]\nFlavor chain: 25%|██▌ | 8/32 [00:27<01:23, 3.49s/it]\nFlavor chain: 28%|██▊ | 9/32 [00:30<01:19, 3.47s/it]\nFlavor chain: 28%|██▊ | 9/32 [00:34<01:26, 3.78s/it]",
"output": "a close up of a painting of a woman's face, a screenprint, by Barbara Nessim, behance, art & language, large gaping mouth, james gilleard and james jean, larynx, new yorker illustration, clipart, breaking apart, exasperated, pleasure, sinew",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-03-25T15:56:01.2523Z",
"started_at": "2023-03-25T15:56:40.090026Z",
"completed_at": "2023-03-25T15:57:17.99203Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/5uefhn7pznaxthsa6hlqkjdk2u/cancel",
"get": "https://api.replicate.com/v1/predictions/5uefhn7pznaxthsa6hlqkjdk2u"
},
"metrics": {
"predict_time": 37.902004,
"total_time": 76.73973
}
}