alexgenovese / instruct-blip-v2

Captioning images with BLIP 2 Instruct

  • Public
  • 9 runs
  • L40S
Iterate in playground

Input

pip install replicate
Set the REPLICATE_API_TOKEN environment variable:
export REPLICATE_API_TOKEN=<paste-your-token-here>

Find your API token in your account settings.

Import the client:
import replicate

Run alexgenovese/instruct-blip-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

output = replicate.run(
    "alexgenovese/instruct-blip-v2:42beef8139a0e0ed7a3a0350ee5af5e286d4c8a96370ac71699d59a7ee8c31a9",
    input={
        "top_p": 0.9,
        "prompt": "describe the image",
        "max_len": 250,
        "min_len": 1,
        "beam_size": 5,
        "image_url": "",
        "len_penalty": 1,
        "repetition_penalty": 2
    }
)
print(output)

To learn more, take a look at the guide on getting started with Python.

Output

No output yet! Press "Submit" to start a prediction.

Run time and cost

This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

This model doesn't have a readme.