| hf_describe_image | R Documentation |
Ask a vision-capable chat model to describe an image.
hf_describe_image(
image,
prompt = "Describe this image.",
model = hf_default_model("vision_chat"),
max_tokens = 200,
token = NULL,
endpoint_url = NULL,
...
)
image |
Image URL, local file path, raw vector, or a character vector/list of image URLs or paths. |
prompt |
Prompt to send with each image. Default: "Describe this image." |
model |
Character string. Vision-capable chat model ID. |
max_tokens |
Integer. Maximum tokens to generate. Default: 200. |
token |
Character string or NULL. API token for authentication. |
endpoint_url |
Character string or NULL. A custom Inference Endpoint URL. |
... |
Additional parameters passed to |
A tibble with columns: image, description.
## Not run:
image <- paste0(
"https://huggingface.co/datasets/huggingface/",
"documentation-images/resolve/main/cat.png"
)
hf_describe_image(image)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.