https://github.com/seanvelasco/memegraph
Meme search and discovery engine using OpenAI CLIP and Salesforce BLIP
https://github.com/seanvelasco/memegraph
catlip clip corenet memes mlx openai search-algorithm siglip transformer
Last synced: about 1 month ago
JSON representation
Meme search and discovery engine using OpenAI CLIP and Salesforce BLIP
- Host: GitHub
- URL: https://github.com/seanvelasco/memegraph
- Owner: seanvelasco
- Created: 2024-04-21T16:01:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T07:57:21.000Z (over 1 year ago)
- Last Synced: 2025-08-22T03:49:19.249Z (11 months ago)
- Topics: catlip, clip, corenet, memes, mlx, openai, search-algorithm, siglip, transformer
- Language: Python
- Homepage: https://memegraph.sean.app
- Size: 2.04 MB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Memegraph
Memegraph is a search engine and recommendation system for memes using OpenAI CLIP and Salesforce BLIP.
Search memes in natural langauge, explore memes with the same template, and discover memes that are visually similar.
### Don't know the name of a meme? Just describe the meme!

### Discover memes about your favorite topics

### Looking for THAT obscure meme? Look it up!

### Discover similar memes

### New way to browse memes

## Development
> [!IMPORTANT]
> This app uses MLX to run CLIP. To generate embeddings, a device with an Apple Silicon processor is needed. For non-Apple Silicon devices, the app can still run, provided there are already images and embeddings in the database, but it will not be able to search for memes by image similarity.
Install dependencies
```bash
pip install -r requirements.txt
```
Modify scripts in `/scripts` to point to your images directory, blob storage, and Postgres database.
Generate image embeddings and generate image captions
```bash
python main.py
```
Run the app in development
```bash
python app.py
```
Run the app in production
```bash
waitress-serve app:app
```
## Data
All memes were retrieved from the top 1000 posts of all time on [Reddit's meme subreddits](https://www.reddit.com/t/memes) using [PRAW](https://praw.readthedocs.io/en/stable/) on the Reddit's API free tier.
### Notes from the author
Python is not my primary language and I'm new to machine learning, so I greatly appreciate and welcome constructive feedback!