|
1 | 1 | Metadata-Version: 1.1
|
2 | 2 | Name: altify
|
3 |
| -Version: 0.1 |
| 3 | +Version: 3.9 |
4 | 4 | Summary: Uses deep learning to caption img tags within a web page and fills out their alt attribute with the related caption
|
5 | 5 | Home-page: https://github.com/parhamp/altify
|
6 | 6 | Author: Parham Pourdavood
|
7 | 7 |
|
8 |
| -License: UNKNOWN |
9 |
| -Download-URL: https://github.com/parhamp/altify/tarball/0.1 |
10 |
| -Description: UNKNOWN |
11 |
| -Keywords: alt,caption,images |
| 8 | +License: Apache-2.0 |
| 9 | +Download-URL: https://github.com/parhamp/altify/tarball/3.3 |
| 10 | +Description: Altify |
| 11 | + ====== |
| 12 | + |
| 13 | + .. image:: https://github.com/ParhamP/altify/blob/master/images/gif.gif?raw=true |
| 14 | + |
| 15 | + Altify automizes the task of inserting alternative text attributes for |
| 16 | + image tags. Altify uses Microsoft Computer Vision API's deep learning |
| 17 | + algorithms to caption images in an HTML file and returns a new HTML file |
| 18 | + in which alt attributes are filled out with their corresponding |
| 19 | + captions. |
| 20 | + |
| 21 | + Notice: Altify will now ignore any image tag whose alt attribute has |
| 22 | + content or is just an empty string. (In compliance with standard web |
| 23 | + practices) |
| 24 | + |
| 25 | + Dependencies |
| 26 | + ------------ |
| 27 | + |
| 28 | + - BeautifulSoup |
| 29 | + - Python 2.7 |
| 30 | + - html5lib |
| 31 | + |
| 32 | + Install and Usage (Latest Version) |
| 33 | + ---------------------------------- |
| 34 | + |
| 35 | + 1) Get a Microsoft API Key for Free |
| 36 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 37 | + |
| 38 | + https://www.microsoft.com/cognitive-services/en-us/sign-up. |
| 39 | + |
| 40 | + 2) Install via pip |
| 41 | + ~~~~~~~~~~~~~~~~~~ |
| 42 | + |
| 43 | + Open up terminal and enter: ``pip install altify`` |
| 44 | + |
| 45 | + 3) Use |
| 46 | + ~~~~~~ |
| 47 | + |
| 48 | + ``altify path_to_your_html api_key`` |
| 49 | + |
| 50 | + 4) Enjoy! |
| 51 | + ~~~~~~~~~ |
| 52 | + |
| 53 | + A new HTML file called altify.html is created next to the HTML file you |
| 54 | + selected. (Or Desktop, when using older versions) |
| 55 | + |
| 56 | + How It was Built |
| 57 | + ---------------- |
| 58 | + |
| 59 | + 1. Parses the html using BeautifulSoup. |
| 60 | + 2. Find all the image tags. |
| 61 | + 3. Stream images using uploads.im API, and then with its URL, send |
| 62 | + request to Microsoft's API to caption. |
| 63 | + 4. Filter images that are smaller than 200px width. |
| 64 | + 5. Fill out the alt attributes for all the images. |
| 65 | + 6. Write an edited HTML file next to the file you selected. |
| 66 | + |
| 67 | + Captioned Images Samples |
| 68 | + ------------------------ |
| 69 | + |
| 70 | + .. image:: https://github.com/ParhamP/altify/blob/master/images/pic.png?raw=true |
| 71 | + |
| 72 | + Donald Trump wearing a suit and tie |
| 73 | + |
| 74 | + .. image:: https://github.com/ParhamP/altify/blob/master/images/piano.jpg?raw=true |
| 75 | + |
| 76 | + A piano keyboard |
| 77 | + |
| 78 | + .. image:: https://github.com/ParhamP/altify/blob/master/images/animal.jpg?raw=true |
| 79 | + |
| 80 | + A squirrel eating |
| 81 | + |
| 82 | + .. image:: https://github.com/ParhamP/altify/blob/master/images/cat.jpg?raw=true |
| 83 | + |
| 84 | + A close up of a cat looking at the camera |
| 85 | + |
| 86 | + .. image:: https://github.com/ParhamP/altify/blob/master/images/lady.jpg?raw=true |
| 87 | + |
| 88 | + A woman wearing a red hat |
| 89 | + |
| 90 | + .. image:: https://github.com/ParhamP/altify/blob/master/images/lake.jpg?raw=true |
| 91 | + |
| 92 | + A small boat in a lake surrounded by mountains |
| 93 | + |
| 94 | + Disclaimer |
| 95 | + ---------- |
| 96 | + |
| 97 | + Humans are currently better at captioning images than machines. Use |
| 98 | + responsibly! |
| 99 | + |
| 100 | +Keywords: alt,caption,images,deep learning |
12 | 101 | Platform: UNKNOWN
|
0 commit comments