typefile
{
"assistant_prefix": "Let's think step by step.",
"decoding_strategy": "top-p-sampling",
"image": "https://replicate.delivery/pbxt/LRy82RONNFuqeS0JjwoxJQVxJMkxQ73xdshWr9mhXmRPJWjy/dogonbench.png",
"max_new_tokens": 512,
"repetition_penalty": 1.2,
"temperature": 0.4,
"text": "What do you see? Give me a detailed answer",
"top_p": 0.8
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ENB**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run zsxkib/idefics3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zsxkib/idefics3:b06f5f6b6249b27d0b00d1b794240e5641190d1582ad68c40ef53778459bb593",
{
input: {
assistant_prefix: "Let's think step by step.",
decoding_strategy: "top-p-sampling",
image: "https://replicate.delivery/pbxt/LRy82RONNFuqeS0JjwoxJQVxJMkxQ73xdshWr9mhXmRPJWjy/dogonbench.png",
max_new_tokens: 512,
repetition_penalty: 1.2,
temperature: 0.4,
text: "What do you see? Give me a detailed answer",
top_p: 0.8
}
}
);
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_ENB**********************************
This is your API token. Keep it to yourself.
import replicate
Run zsxkib/idefics3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zsxkib/idefics3:b06f5f6b6249b27d0b00d1b794240e5641190d1582ad68c40ef53778459bb593",
input={
"assistant_prefix": "Let's think step by step.",
"decoding_strategy": "top-p-sampling",
"image": "https://replicate.delivery/pbxt/LRy82RONNFuqeS0JjwoxJQVxJMkxQ73xdshWr9mhXmRPJWjy/dogonbench.png",
"max_new_tokens": 512,
"repetition_penalty": 1.2,
"temperature": 0.4,
"text": "What do you see? Give me a detailed answer",
"top_p": 0.8
}
)
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_ENB**********************************
This is your API token. Keep it to yourself.
Run zsxkib/idefics3 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": "zsxkib/idefics3:b06f5f6b6249b27d0b00d1b794240e5641190d1582ad68c40ef53778459bb593",
"input": {
"assistant_prefix": "Let\'s think step by step.",
"decoding_strategy": "top-p-sampling",
"image": "https://replicate.delivery/pbxt/LRy82RONNFuqeS0JjwoxJQVxJMkxQ73xdshWr9mhXmRPJWjy/dogonbench.png",
"max_new_tokens": 512,
"repetition_penalty": 1.2,
"temperature": 0.4,
"text": "What do you see? Give me a detailed answer",
"top_p": 0.8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
A white dog is sitting on the bench. The background of the image is blurred, but we can still see trees and dry grass in the background. There are clouds visible in the sky.
{
"id": "5bsgd1g04drgp0charv92wqy1g",
"model": "zsxkib/idefics3",
"version": "b06f5f6b6249b27d0b00d1b794240e5641190d1582ad68c40ef53778459bb593",
"input": {
"assistant_prefix": "Let's think step by step.",
"decoding_strategy": "top-p-sampling",
"image": "https://replicate.delivery/pbxt/LRy82RONNFuqeS0JjwoxJQVxJMkxQ73xdshWr9mhXmRPJWjy/dogonbench.png",
"max_new_tokens": 512,
"repetition_penalty": 1.2,
"temperature": 0.4,
"text": "What do you see? Give me a detailed answer",
"top_p": 0.8
},
"logs": "",
"output": " A white dog is sitting on the bench. The background of the image is blurred, but we can still see trees and dry grass in the background. There are clouds visible in the sky.",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-08-15T13:24:25.251Z",
"started_at": "2024-08-15T13:27:03.03822Z",
"completed_at": "2024-08-15T13:27:06.485323Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/5bsgd1g04drgp0charv92wqy1g/cancel",
"get": "https://api.replicate.com/v1/predictions/5bsgd1g04drgp0charv92wqy1g",
"web": "https://replicate.com/p/5bsgd1g04drgp0charv92wqy1g"
},
"metrics": {
"predict_time": 3.447103029,
"total_time": 161.234323
}
}