Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
lucataco /ollama-llama3.2-vision-11b:d4e81fc1
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/ollama-llama3.2-vision-11b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/ollama-llama3.2-vision-11b:d4e81fc1472556464f1ee5cea4de177b2fe95a6eaadb5f63335df1ba654597af",
{
input: {
image: "https://replicate.delivery/pbxt/M9qcwNcnvBaN9N0vMmHSiXij24PPaE23uAmHjzu2wnUWssmn/invoice.png",
top_p: 0.95,
prompt: "How long does it take from invoice date to due date? Be short and concise.",
max_tokens: 512,
temperature: 0.7
}
}
);
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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run lucataco/ollama-llama3.2-vision-11b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/ollama-llama3.2-vision-11b:d4e81fc1472556464f1ee5cea4de177b2fe95a6eaadb5f63335df1ba654597af",
input={
"image": "https://replicate.delivery/pbxt/M9qcwNcnvBaN9N0vMmHSiXij24PPaE23uAmHjzu2wnUWssmn/invoice.png",
"top_p": 0.95,
"prompt": "How long does it take from invoice date to due date? Be short and concise.",
"max_tokens": 512,
"temperature": 0.7
}
)
# The lucataco/ollama-llama3.2-vision-11b model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/lucataco/ollama-llama3.2-vision-11b/api#output-schema
print(item, end="")
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run lucataco/ollama-llama3.2-vision-11b 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/ollama-llama3.2-vision-11b:d4e81fc1472556464f1ee5cea4de177b2fe95a6eaadb5f63335df1ba654597af",
"input": {
"image": "https://replicate.delivery/pbxt/M9qcwNcnvBaN9N0vMmHSiXij24PPaE23uAmHjzu2wnUWssmn/invoice.png",
"top_p": 0.95,
"prompt": "How long does it take from invoice date to due date? Be short and concise.",
"max_tokens": 512,
"temperature": 0.7
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-12-17T04:14:25.515004Z",
"created_at": "2024-12-17T04:14:22.783000Z",
"data_removed": false,
"error": null,
"id": "f5k4rhfw7xrmc0cktb9aywvrf8",
"input": {
"image": "https://replicate.delivery/pbxt/M9qcwNcnvBaN9N0vMmHSiXij24PPaE23uAmHjzu2wnUWssmn/invoice.png",
"top_p": 0.95,
"prompt": "How long does it take from invoice date to due date? Be short and concise.",
"max_tokens": 512,
"temperature": 0.7
},
"logs": null,
"metrics": {
"predict_time": 2.726078652,
"total_time": 2.732004
},
"output": [
"From",
" the",
" invoice",
" date",
" of",
" ",
"11",
"/",
"02",
"/",
"201",
"9",
" to",
" the",
" due",
" date",
" of",
" ",
"26",
"/",
"02",
"/",
"201",
"9",
",",
" there",
" is",
" a",
" difference",
" of",
" **",
"15",
" days",
"**",
".\n\n",
"This",
" calculation",
" was",
" performed",
" by",
" subtract",
"ing",
" the",
" invoice",
" date",
" from",
" the",
" due",
" date",
":",
" \n",
"26",
"/",
"02",
"/",
"201",
"9",
" -",
" ",
"11",
"/",
"02",
"/",
"201",
"9",
" =",
" ",
"15",
""
],
"started_at": "2024-12-17T04:14:22.788925Z",
"status": "succeeded",
"urls": {
"stream": "https://stream-b.svc.ric1.c.replicate.net/v1/streams/2wn3f7engkmxnxzxcktfyss4whq4pi2gobf3m3icg5zicr3wp6ha",
"get": "https://api.replicate.com/v1/predictions/f5k4rhfw7xrmc0cktb9aywvrf8",
"cancel": "https://api.replicate.com/v1/predictions/f5k4rhfw7xrmc0cktb9aywvrf8/cancel"
},
"version": "d4e81fc1472556464f1ee5cea4de177b2fe95a6eaadb5f63335df1ba654597af"
}