Skip to content
Avatar of NutlopeNutlope/alt-text-generator

Flask Alt Text Generator

A flask API that generates a description for any image.

Framework
Use Case
CSS
Alt Image Generator

Alt Image Generator

This Flask API will generate a description for any image using AI. If you're looking for the TypeScript version, click here.

How it works

This project uses an ML modal from Salesforce called BLIP on Replicate to generate relevant alt text for images. You can feed the Flask API endpoint an image as a query param and it will return a one sentence description of that image.

Running Locally

After cloning the repo, go to Replicate to make an account and put your API key in .env.

Then, run the following in the command line and your application will be available at http://localhost:3000

npm i -g vercel
vercel dev

To use the API route, go to the link below in your browser or run a curl command in your terminal to get a sample result. Feel free to replace the dub.sh link with a link to any image.

curl http://localhost:3000/generate?imageUrl=https://dub.sh/confpic
Alt Image Generator
Avatar of NutlopeNutlope/alt-text-generator

Flask Alt Text Generator

A flask API that generates a description for any image.

Framework
Use Case
CSS

Alt Image Generator

This Flask API will generate a description for any image using AI. If you're looking for the TypeScript version, click here.

How it works

This project uses an ML modal from Salesforce called BLIP on Replicate to generate relevant alt text for images. You can feed the Flask API endpoint an image as a query param and it will return a one sentence description of that image.

Running Locally

After cloning the repo, go to Replicate to make an account and put your API key in .env.

Then, run the following in the command line and your application will be available at http://localhost:3000

npm i -g vercel
vercel dev

To use the API route, go to the link below in your browser or run a curl command in your terminal to get a sample result. Feel free to replace the dub.sh link with a link to any image.

curl http://localhost:3000/generate?imageUrl=https://dub.sh/confpic

Unleash New Possibilities

Deploy your app on Vercel and unlock its full potential