Skip to main content
https://github.com/ParhamP/altify/blob/master/images/gif.gif?raw=true

Altify automizes the task of inserting alternative text attributes for image tags. Altify uses Microsoft Computer Vision API’s deep learning algorithms to caption images in an HTML file and returns a new HTML file in which alt attributes are filled out with their corresponding captions.

Notice: Altify will now ignore any image tag whose alt attribute has content or is just an empty string. (In compliance with standard web practices)

Dependencies

  • Python 2.7

  • BeautifulSoup

Install and Usage (Latest Version)

1) Get a Microsoft API Key for Free

https://www.microsoft.com/cognitive-services/en-us/sign-up.

2) Install via pip

Open up terminal and enter: pip install altify

3) Use

altify path_to_your_html api_key

4) Enjoy!

A new HTML file called altify.html is created next to the HTML file you selected.

How It was Built

  1. Parses the html using BeautifulSoup.

  2. Finds all the image tags.

  3. Sends a request to Microsoft’s API to caption.

  4. Fills out the alt attributes for all the images.

  5. Writes an edited HTML file next to the file you selected.

Captioned Images Samples

https://github.com/ParhamP/altify/blob/master/images/pic.png?raw=true

Donald Trump wearing a suit and tie

https://github.com/ParhamP/altify/blob/master/images/piano.jpg?raw=true

A piano keyboard

https://github.com/ParhamP/altify/blob/master/images/animal.jpg?raw=true

A squirrel eating

https://github.com/ParhamP/altify/blob/master/images/cat.jpg?raw=true

A close up of a cat looking at the camera

https://github.com/ParhamP/altify/blob/master/images/lady.jpg?raw=true

A woman wearing a red hat

https://github.com/ParhamP/altify/blob/master/images/lake.jpg?raw=true

A small boat in a lake surrounded by mountains

Disclaimer

Humans are currently better at captioning images than machines. Use responsibly!

Release files for altify 4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for altify 4.2
File Size Uploaded
altify-4.2.tar.gz 4.1 kB Details

Release files / altify-4.2.tar.gz

Download URL altify-4.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bdc30fb678663c737c1cdf02112df10a72d561da6593680a023d41e3d2e22695
BLAKE2b-256 checksum
How to use checksums
fc17802159bbd1024065e1360e23ef24fc2ffe27fa5a74c12bcfb2376393e562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

4.2 This release

1 release file

4.1

4.0

1 release file

3.9

1 release file

3.8

1 release file

3.7

1 release file

3.6

1 release file

3.5

1 release file

3.4

1 release file

3.3

1 release file

3.2

1 release file

3.1

1 release file

3.0

1 release file

2.9

1 release file

2.8

1 release file

2.7

1 release file

2.6

1 release file

2.5

1 release file

2.4

1 release file

2.3

1 release file

1.2

1 release file

1.0

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page