Hi.

I am using the following to fetch/install/configure llava, Meta AIs
multi-modal LLM for image description.
It will download llava-1.5 from HuggingFace, place it
in ~/.local/bin, and add a .mailcap entry for image/jpeg to
call llava.  Depending on your machine, descriptions
might take a minute or two.  OTOH, you don't need API access (payed)
for any AI providers, nor will your data be sent over the net.
Its a complete free and local solution.

After you executed this script (or performed the equivalent actions)
you can invoke image links in Lynx.  After the obligatory waiting time,
you will be presented with a textual description of the linked image in
a pager.  Read the description, and type 'q' to continue with your
browsing.

If you find improvements to this approach, let me know.

#!/bin/sh

set -e

# Install llava in ~/.local/bin
[ -d ~/.local/bin ] || mkdir -p ~/.local/bin
[ -r ~/.local/bin/llava-v1.5-7b-q4.llamafile ] || curl --location --remote-name --output-dir ~/.local/bin https://huggingface.co/Mozilla/llava-v1.5-7b-llamafile/resolve/main/llava-v1.5-7b-q4.llamafile
[ -x ~/.local/bin/llava-v1.5-7b-q4.llamafile ] || chmod +x ~/.local/bin/llava-v1.5-7b-q4.llamafile

# Install a mailcap entry to run llava onl image/jpeg files
grep llava-v1.5 ~/.mailcap >/dev/null 2>/dev/null || echo "image/jpeg; llava-v1.5-7b-q4.llamafile --cli --image '%s' 2>/dev/null | fmt -w 80 | less; copiousoutput; needsterminal" >> ~/.mailcap
-- 
CYa,
  ⡍⠁⠗⠊⠕
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to