--- license: mit title: AI Alt Tag Generator emoji: ๐Ÿค– colorFrom: blue colorTo: green sdk: transformers python_version: 3.8 tags: - computer-vision - image-to-text - accessibility - alt-text - blip - transformers - pytorch datasets: - imagenet library_name: transformers pipeline_tag: image-to-text --- # AI Alt Tag Generator **AI-powered alt tag generation for web accessibility** - Making the web accessible for everyone! ## โœจ Features - ๐Ÿš€ **Fast Generation**: 0.5-2 seconds per image - ๐ŸŽฏ **5 Alt Tag Styles**: Short, Medium, Long, Accessibility, SEO - ๐ŸŒ **89 Languages**: Multilingual support via Google Translate - โšก **GPU Acceleration**: Automatic CUDA detection and fallback - โ™ฟ **WCAG 2.1 AA**: Compliance-focused alt text generation ## ๐Ÿš€ Quick Start ### Installation ```bash pip install -r requirements.txt ``` ### Basic Usage ```python from alt_tag_generator import AltTagGenerator # Initialize generator generator = AltTagGenerator() # Generate alt tags for an image results = generator.generate_alt_tags("https://example.com/image.jpg") # Display results generator.display_results(results) ``` ### Output Example ``` ALT TAG RESULTS ================================================== Source: https://example.com/cat.jpg Size: (800, 600) Caption: a cat sitting on a table Device: cuda Time: 1.23s Confidence: 0.85 ALT TAG VARIATIONS: ------------------------------ SHORT: cat sitting table MEDIUM: cat sitting on table LONG: cat sitting on a table ACCESSIBILITY: Image shows cat sitting on a table SEO: cat sitting table ================================================== ``` ## ๐Ÿงช Testing Run the built-in demo: ```python from alt_tag_generator import quick_demo quick_demo() ``` ## ๐Ÿ“Š Performance - **Speed**: 0.5-2 seconds per image - **Memory**: ~1GB GPU VRAM (or 2GB RAM for CPU) - **Model Size**: ~990MB download - **Accuracy**: 85%+ typical confidence - **Languages**: 89 supported languages ## ๐Ÿ› ๏ธ System Requirements ### Minimum Requirements - Python 3.8+ - 4GB RAM - 2GB disk space ### Recommended Requirements - Python 3.10+ - 8GB RAM - NVIDIA GPU with 4GB+ VRAM - 10GB disk space ## ๐Ÿ“„ License This project is licensed under the MIT License. ## ๐Ÿ™ Acknowledgments - **Salesforce BLIP**: For the amazing image captioning model - **Hugging Face**: For the transformers library and model hosting - **Accessibility Community**: For guidance on WCAG compliance --- **Made with love for web accessibility by [abhilash88](https://huggingface.co/abhilash88)** *"Making the web accessible for everyone, one image at a time."*