ai6yr, to ai

😬 Apologies for way too much news on "people using AI for porn" this morning. (although... the identities of everyone buying AI porn accidentally exposed is interesting, LOL)

https://infosec.exchange/@josephcox/112473926878476027

joe, to ai

LLaVA (Large Language-and-Vision Assistant) was updated to version 1.6 in February. I figured it was time to look at how to use it to describe an image in Node.js. LLaVA 1.6 is an advanced vision-language model created for multi-modal tasks, seamlessly integrating visual and textual data. Last month, we looked at how to use the official Ollama JavaScript Library. We are going to use the same library, today.

Basic CLI Example

Let’s start with a CLI app. For this example, I am using my remote Ollama server but if you don’t have one of those, you will want to install Ollama locally and replace const ollama = new Ollama({ host: 'http://100.74.30.25:11434' }); with const ollama = new Ollama({ host: 'http://localhost:11434' });.

To run it, first run npm i ollama and make sure that you have "type": "module" in your package.json. You can run it from the terminal by running node app.js <image filename>. Let’s take a look at the result.

Its ability to describe an image is pretty awesome.

Basic Web Service

So, what if we wanted to run it as a web service? Running Ollama locally is cool and all but it’s cooler if we can integrate it into an app. If you npm install express to install Express, you can run this as a web service.

The web service takes posts to http://localhost:4040/describe-image with a binary body that contains the image that you are trying to get a description of. It then returns a JSON object containing the description.

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-18-at-1.41.20%E2%80%AFPM.png?resize=1024%2C729&ssl=1

Have any questions, comments, etc? Feel free to drop a comment, below.

https://jws.news/2024/how-can-you-use-llava-and-node-js-to-describe-an-image/

ojrask, to meta
@ojrask@piipitin.fi avatar

Meta's Workplace shuts down in 2026.

I guess making money somewhat honestly by having customers that actually pay for a service with at least some guarantees of privacy and safety is not as lucrative as having an open platform network where people are tricked into giving out all their data while they are spied upon for whatever reasons.

aallan, to llm
@aallan@mastodon.social avatar
bornach, to ai
@bornach@masto.ai avatar

Enrico Tartarotti on the current "frenzy" of putting Large Language Model chatbots into everything and marketing everything as having
https://youtu.be/CY_b8w8u9NY

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • magazineikmin
  • Youngstown
  • osvaldo12
  • khanakhh
  • slotface
  • tacticalgear
  • InstantRegret
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • everett
  • rosin
  • provamag3
  • Durango
  • GTA5RPClips
  • ethstaker
  • modclub
  • mdbf
  • cisconetworking
  • anitta
  • Leos
  • cubers
  • normalnudes
  • tester
  • megavids
  • lostlight
  • All magazines