You're looking at a specific version of this model. Jump to the model overview.
camenduru /minigpt4-video:56793424
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 camenduru/minigpt4-video using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"camenduru/minigpt4-video:5679342473d4fd99cf75e140a403e6463f8d5cdc324525783e0d7e35cf27f68b",
{
input: {
question: "What's this video talking about?",
video_path: "https://replicate.delivery/pbxt/Ki1e55jITlncFjy37fzGzIXgFmGax3N21g9oj818BCkR9Dag/World%E2%80%99s%20Grumpiest%20Cat%20I%20Frozen%20Planet%20II%20I%20BBC.mp4",
add_subtitles: false
}
}
);
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 camenduru/minigpt4-video using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"camenduru/minigpt4-video:5679342473d4fd99cf75e140a403e6463f8d5cdc324525783e0d7e35cf27f68b",
input={
"question": "What's this video talking about?",
"video_path": "https://replicate.delivery/pbxt/Ki1e55jITlncFjy37fzGzIXgFmGax3N21g9oj818BCkR9Dag/World%E2%80%99s%20Grumpiest%20Cat%20I%20Frozen%20Planet%20II%20I%20BBC.mp4",
"add_subtitles": False
}
)
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=<paste-your-token-here>
Find your API token in your account settings.
Run camenduru/minigpt4-video 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": "camenduru/minigpt4-video:5679342473d4fd99cf75e140a403e6463f8d5cdc324525783e0d7e35cf27f68b",
"input": {
"question": "What\'s this video talking about?",
"video_path": "https://replicate.delivery/pbxt/Ki1e55jITlncFjy37fzGzIXgFmGax3N21g9oj818BCkR9Dag/World%E2%80%99s%20Grumpiest%20Cat%20I%20Frozen%20Planet%20II%20I%20BBC.mp4",
"add_subtitles": false
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/camenduru/minigpt4-video@sha256:5679342473d4fd99cf75e140a403e6463f8d5cdc324525783e0d7e35cf27f68b \
-i $'question="What\'s this video talking about?"' \
-i 'video_path="https://replicate.delivery/pbxt/Ki1e55jITlncFjy37fzGzIXgFmGax3N21g9oj818BCkR9Dag/World%E2%80%99s%20Grumpiest%20Cat%20I%20Frozen%20Planet%20II%20I%20BBC.mp4"' \
-i 'add_subtitles=false'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 r8.im/camenduru/minigpt4-video@sha256:5679342473d4fd99cf75e140a403e6463f8d5cdc324525783e0d7e35cf27f68b
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "question": "What\'s this video talking about?", "video_path": "https://replicate.delivery/pbxt/Ki1e55jITlncFjy37fzGzIXgFmGax3N21g9oj818BCkR9Dag/World%E2%80%99s%20Grumpiest%20Cat%20I%20Frozen%20Planet%20II%20I%20BBC.mp4", "add_subtitles": false } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.0087. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-04-08T03:00:19.627231Z",
"created_at": "2024-04-08T03:00:07.083000Z",
"data_removed": false,
"error": null,
"id": "hm6tmkrk5drgg0ceqeka5gx8c4",
"input": {
"question": "What's this video talking about?",
"video_path": "https://replicate.delivery/pbxt/Ki1e55jITlncFjy37fzGzIXgFmGax3N21g9oj818BCkR9Dag/World%E2%80%99s%20Grumpiest%20Cat%20I%20Frozen%20Planet%20II%20I%20BBC.mp4",
"add_subtitles": false
},
"logs": "img_embeds shape torch.Size([45, 64, 4096])\ninputs_embeds shape torch.Size([1, 3034, 4096])\nattention_mask shape torch.Size([1, 3034])",
"metrics": {
"predict_time": 12.505373,
"total_time": 12.544231
},
"output": "This video features footage of different animals in various natural environments, including a cat sleeping on the grass and walking across snowy terrain. The main focus is two bear cubs that are seen wandering around together while searching for food during wintertime overland.",
"started_at": "2024-04-08T03:00:07.121858Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/hm6tmkrk5drgg0ceqeka5gx8c4",
"cancel": "https://api.replicate.com/v1/predictions/hm6tmkrk5drgg0ceqeka5gx8c4/cancel"
},
"version": "5679342473d4fd99cf75e140a403e6463f8d5cdc324525783e0d7e35cf27f68b"
}
img_embeds shape torch.Size([45, 64, 4096])
inputs_embeds shape torch.Size([1, 3034, 4096])
attention_mask shape torch.Size([1, 3034])