File size: 1,217 Bytes
9878f3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

---
title: AI Meme Generator + Explainer
emoji: 😂
colorFrom: purple
colorTo: pink
sdk: gradio
app_file: app.py
pinned: false
---

# AI Meme Generator + Explainer

## Overview
Upload an image and get a short meme caption **plus a brief explanation** of why the joke works. The app combines an image captioning model (BLIP-base) with a lightweight text generator (DistilGPT‑2), so it runs on CPU hardware.

## How it works
1. **Caption**: BLIP generates a plain description of the image.  
2. **Meme line**: a small language model turns that description into a short, witty caption (≤ 12 words).  
3. **Explain**: a tiny ruleset highlights classic humor cues (relatability, incongruity, exaggeration).  

## Features
- Works on **CPU** (no GPU required).  
- Classic meme text overlay (top/center/bottom + uppercase).  
- Safe, family‑friendly captions (no names, no offensive content).  

## How to Run Locally
```bash
pip install -r requirements.txt
python app.py
```

## Acceptable Use
This project is intended for educational and entertainment purposes only. Do **not** use it to create harmful, offensive, or illegal content. Please respect the model licenses and the Hugging Face Acceptable Use Policy.