File size: 5,926 Bytes
bbfde3f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | # π Quick Start: FREE AI Alt Text Generation
## 2-Minute Setup (100% FREE!)
### Step 1: Install Dependencies
```bash
cd "Cycle 2 Testing/Accessibility-Checker-BE/python-server"
pip install -r requirements.txt
```
**That's it!** No configuration needed. The system works with smart defaults.
**First run note**: The AI model downloads ~1-2GB (one time only, then cached)
### Step 2: Start the Server
```bash
python server2.py
```
Look for: `β
Local AI vision model loaded (BLIP - 100% FREE, No Costs)`
### Step 3: Test It!
Upload a PowerPoint through the frontend. The system will:
- β
Analyze accessibility issues
- β
Generate AI alt text for images **using FREE local AI**
- β
Create a remediated file for download
- β
**Zero API costs, zero API keys needed!**
### Optional: Customize Settings
If you want to change settings (like using a different AI model):
```bash
cp .env.example .env
# Edit .env with any text editor to customize
```
**But don't worry** - the system works perfectly without .env! It's completely optional.
---
## What's New?
### Before (Placeholder Alt Text)
```
"Image on slide 3"
"decorative"
```
### After (FREE AI-Generated Alt Text)
```
"Bar chart with four colored bars showing increasing values"
"Person standing at whiteboard presenting to seated audience"
"Company logo with red and blue colors"
```
---
## How It Works
### π The Only Option: Local BLIP Model (100% FREE!)
**Local BLIP AI Model**
- β
**100% Free, unlimited usage**
- β
Runs on your computer (offline after first download)
- β
No internet required for processing
- β
No API keys needed
- β
No account creation
- β
No surprise billing - ever!
- β
Fast and good quality (7/10)
- β¬οΈ ~1GB download on first run
- β‘ Instant on subsequent runs
## Why This Setup?
All OpenAI references have been **completely removed** from the project to eliminate any possibility of surprise billing. The free local AI model is:
- **Good enough** - Works great for academic projects
- **Cost effective** - $0 per image vs $0.17 with paid APIs
- **Simple** - No configuration needed
- **Safe** - Runs on your own computer, no data sent anywhere
---
## Configuration (100% Optional!)
### Why no .env file is needed
The system works perfectly with smart defaults:
- β
Uses local BLIP model automatically
- β
Enables AI alt text generation
- β
No API keys to configure
**Just install and run - that's it!**
### Optional: Customize (Create .env)
If you want to change settings, copy the template:
```bash
# Copy template
cp .env.example .env
# Edit with your preferred editor
# Optional settings you might change:
LOCAL_VISION_MODEL=blip-base # Use blip-large for better quality
ENABLE_AI_ALT_TEXT=true # Set to false to disable AI (for debugging)
```
**See `ENV_FILE_GUIDE.md` for complete .env documentation.**
---
## Server Console Output
When everything is working:
```
β
Local AI vision model loaded (BLIP - 100% FREE, No Costs)
π Starting alt text remediation for: document.pptx
AI Mode: LOCAL (100% FREE - No Costs)
π€ Using FREE local AI (BLIP) for slide 1
β
AI generated alt text for Picture 1: 'Professional man in business suit...'
β
Remediation complete: 3 images processed
π€ 3 alt texts generated by FREE local AI (no cost)
```
---
## Troubleshooting
### Problem: Slow download on first run
**Explanation**: System is downloading BLIP AI model (~1-2GB)
**Solution**: This only happens once. Subsequent runs are instant. Be patient!
**Time estimate**: 5-15 minutes depending on internet
### Problem: "transformers not installed"
**Solution**:
```bash
pip install -r requirements.txt
```
### Problem: "ModuleNotFoundError: No module named 'local_vision'"
**Solution**: Make sure you're running from the `python-server/` directory
```bash
cd python-server
python server2.py
```
### Problem: Out of memory errors
**Solution**: Close other programs or use smaller model
```bash
# In .env:
LOCAL_VISION_MODEL=blip-base
```
### Problem: Alt text not being generated
**Check the console output**:
1. Does it show "β
Local AI vision model loaded"?
2. Are images in supported formats (PNG, JPG, GIF)?
3. Is `ENABLE_AI_ALT_TEXT` set to true?
**Run diagnostics**:
```bash
python test_ai_setup.py
```
### Problem: "This model requires transformers version X.X"
**Solution**:
```bash
pip install --upgrade transformers torch
```
---
## Cost: FREE Forever!
| Item | Cost |
|------|------|
| Local BLIP AI Model | $0 |
| First download (one-time) | $0 |
| Unlimited alt text generation | $0 |
| Monthly hosting | $0 (free tier) |
| **Total for entire team** | **$0 forever** |
**Compared to alternatives**:
- OpenAI: ~$0.17/image = $5-10 per presentation
- Google Vision: $1.50/100 images
- Azure: $1/$5/10 per 1000 requests
- **Our solution**: $0 per anything! π
---
## Documentation
For more detailed information, see:
- **ENV_FILE_GUIDE.md** - Complete .env explanation (optional)
- **OPENAI_REMOVAL_COMPLETE.md** - Why OpenAI was removed for safety
- **AI_ALT_TEXT_SETUP.md** - Deep technical documentation
- **STUDENT_SETUP.md** - Student-friendly setup guide
- **FREE_AI_OPTIONS.md** - Comparison of all free alternatives
---
## Summary
β
**Fastest Setup**:
```bash
pip install -r requirements.txt
python server2.py
```
β
**No Configuration Needed**: Works with defaults
β
**100% FREE**: No API keys, no monthly bills, no surprises
β
**High Quality**: BLIP model produces excellent alt text descriptions
β
**Easy to Use**: Upload PowerPoint, download fixed version
β
**For Students**: Zero cost, zero complexity
**Ready to generate alt text for your presentations!** π
|