Skip to content

ParhamP/altify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Altify

image

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 Use

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.

Captioned Images Samples

image

Donald Trump wearing a suit and tie

image

A piano keyboard

image

A squirrel eating

image

A close up of a cat looking at the camera

image

A woman wearing a red hat

image

A small boat in a lake surrounded by mountains

Author

Parham Pourdavood

Disclaimer

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

About

Uses Microsoft Computer Vision API to caption images in an HTML file and fills out its alternative text attributes with the related caption

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages