Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,67 +3,75 @@ title: AI Meme Generator
|
|
| 3 |
emoji: π₯Έ
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: pink
|
| 6 |
-
sdk:
|
| 7 |
-
sdk_version: 4.44.0
|
| 8 |
-
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
# π₯Έ AI Meme Generator
|
| 14 |
|
| 15 |
-
Automatically generate memes using AI browser automation! The agent browses ImgFlip and creates
|
| 16 |
|
| 17 |
## π Features
|
| 18 |
|
| 19 |
-
- π€ Multiple free AI models (
|
| 20 |
- π Automatic browser navigation on ImgFlip
|
| 21 |
-
- π¨
|
| 22 |
-
- π±
|
| 23 |
-
- β‘
|
|
|
|
| 24 |
|
| 25 |
## π Setup Instructions
|
| 26 |
|
| 27 |
### Required: HuggingFace Token
|
| 28 |
|
| 29 |
-
1. Get a **free** token from [HuggingFace](https://huggingface.co/settings/tokens)
|
| 30 |
2. Go to your Space **Settings** β **Repository Secrets**
|
| 31 |
-
3. Add
|
| 32 |
- **Name**: `HF_TOKEN`
|
| 33 |
- **Value**: Your token (starts with `hf_...`)
|
| 34 |
4. Restart the Space
|
| 35 |
|
| 36 |
-
##
|
| 37 |
|
| 38 |
-
1. Enter
|
| 39 |
-
2. Select
|
| 40 |
3. Click "Generate Meme"
|
| 41 |
-
4. Wait 30-90 seconds
|
|
|
|
| 42 |
|
| 43 |
## π οΈ Tech Stack
|
| 44 |
|
| 45 |
-
- **
|
|
|
|
|
|
|
| 46 |
- **AI Models**: HuggingFace Inference API
|
| 47 |
-
- **
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
## β οΈ Important Notes
|
| 51 |
|
| 52 |
-
-
|
| 53 |
-
-
|
| 54 |
-
-
|
| 55 |
-
-
|
| 56 |
|
| 57 |
## π Troubleshooting
|
| 58 |
|
| 59 |
-
- **
|
|
|
|
| 60 |
- **Rate Limit**: Wait 60 seconds between generations
|
| 61 |
-
- **
|
| 62 |
-
- **Model Error**: Try switching to Llama 3.2 3B
|
| 63 |
|
| 64 |
## π License
|
| 65 |
|
| 66 |
-
MIT License - Feel free to fork and
|
| 67 |
|
| 68 |
---
|
| 69 |
|
|
|
|
| 3 |
emoji: π₯Έ
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: pink
|
| 6 |
+
sdk: docker
|
|
|
|
|
|
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
# π₯Έ AI Meme Generator
|
| 12 |
|
| 13 |
+
Automatically generate custom memes using AI browser automation! The agent browses ImgFlip and creates memes based on your description.
|
| 14 |
|
| 15 |
## π Features
|
| 16 |
|
| 17 |
+
- π€ Multiple free AI models (Llama, Qwen, Mistral, Phi)
|
| 18 |
- π Automatic browser navigation on ImgFlip
|
| 19 |
+
- π¨ AI-generated meme text
|
| 20 |
+
- π± Responsive Gradio interface
|
| 21 |
+
- β‘ Real-time status updates
|
| 22 |
+
- π³ Dockerized for Python 3.11 compatibility
|
| 23 |
|
| 24 |
## π Setup Instructions
|
| 25 |
|
| 26 |
### Required: HuggingFace Token
|
| 27 |
|
| 28 |
+
1. Get a **free** token from [HuggingFace Tokens](https://huggingface.co/settings/tokens)
|
| 29 |
2. Go to your Space **Settings** β **Repository Secrets**
|
| 30 |
+
3. Add new secret:
|
| 31 |
- **Name**: `HF_TOKEN`
|
| 32 |
- **Value**: Your token (starts with `hf_...`)
|
| 33 |
4. Restart the Space
|
| 34 |
|
| 35 |
+
## π― Usage
|
| 36 |
|
| 37 |
+
1. Enter meme idea (e.g., "When the code works on first try")
|
| 38 |
+
2. Select AI model (Llama 3.2 3B recommended)
|
| 39 |
3. Click "Generate Meme"
|
| 40 |
+
4. Wait 30-90 seconds
|
| 41 |
+
5. Download your meme!
|
| 42 |
|
| 43 |
## π οΈ Tech Stack
|
| 44 |
|
| 45 |
+
- **Python**: 3.11 (via Docker)
|
| 46 |
+
- **Frontend**: Gradio 4.44
|
| 47 |
+
- **Browser Automation**: Browser-Use 0.8.1 + Playwright
|
| 48 |
- **AI Models**: HuggingFace Inference API
|
| 49 |
+
- **LLM Framework**: LangChain
|
| 50 |
+
|
| 51 |
+
## π¦ Files
|
| 52 |
+
|
| 53 |
+
- `Dockerfile` - Custom Docker image with Python 3.11
|
| 54 |
+
- `app.py` - Main application code
|
| 55 |
+
- `requirements.txt` - Python dependencies
|
| 56 |
+
- `README.md` - This file
|
| 57 |
|
| 58 |
## β οΈ Important Notes
|
| 59 |
|
| 60 |
+
- **Python 3.11 Required**: browser-use needs Python 3.11+, hence the Dockerfile
|
| 61 |
+
- **Rate Limits**: Free tier has limits, wait 60s between requests if needed
|
| 62 |
+
- **Generation Time**: 30-90 seconds (browser automation is slow but accurate)
|
| 63 |
+
- **Best Model**: Llama 3.2 3B for speed + reliability
|
| 64 |
|
| 65 |
## π Troubleshooting
|
| 66 |
|
| 67 |
+
- **Build Error**: Make sure all files (especially Dockerfile) are committed
|
| 68 |
+
- **Token Error**: Verify HF_TOKEN is in Repository Secrets
|
| 69 |
- **Rate Limit**: Wait 60 seconds between generations
|
| 70 |
+
- **Timeout**: Use Llama 3.2 3B (fastest model)
|
|
|
|
| 71 |
|
| 72 |
## π License
|
| 73 |
|
| 74 |
+
MIT License - Feel free to fork and customize!
|
| 75 |
|
| 76 |
---
|
| 77 |
|