Skip to main content

llama-index packs llava_completion integration

Project description

LLaVA Completion Pack

This LlamaPack creates the LLaVA multimodal model, and runs its complete endpoint to execute queries.

CLI Usage

You can download llamapacks directly using llamaindex-cli, which comes installed with the llama-index python package:

llamaindex-cli download-llamapack LlavaCompletionPack --download-dir ./llava_pack

You can then inspect the files at ./llava_pack and use them as a template for your own project!

Code Usage

You can download the pack to a ./llava_pack directory:

from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
LlavaCompletionPack = download_llama_pack(
    "LlavaCompletionPack", "./llava_pack"
)

From here, you can use the pack, or inspect and modify the pack in ./llava_pack.

Then, you can set up the pack like so:

# create the pack
llava_pack = LlavaCompletionPack(image_url="./images/image1.jpg")

The run() function is a light wrapper around llm.complete().

response = llava_pack.run(
    "What dinner can I cook based on the picture of the food in the fridge?"
)

You can also use modules individually.

# call the llm.complete()
llm = llava_pack.llm
response = llm.complete("query_str")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file llama_index_packs_llava_completion-0.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_packs_llava_completion-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c9a59351e771ed220da7c3c51ec95a34aeaeeab18e9e1db7c07c523387d971de
MD5 a7b7fd39311f48d3dc6a563a1045ac67
BLAKE2b-256 2a185d05612e3614ec7dba2deff49eaf8924bcf6740cb5b3c67f567bac7cf6cb

See more details on using hashes here.

File details

Details for the file llama_index_packs_llava_completion-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_packs_llava_completion-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3cdd355b1a6ea7303a5904fd648b1dcab341fde88ad003106acc9d017a4a70a
MD5 799a950f3f41fd4efbbb5bcd120f8094
BLAKE2b-256 1dab04e7ccd0028cc9ca8f7c6b426777f7e40825139372587f0af439738c961e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page