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.
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
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
python main.py
Run the app in development
python app.py
Run the app in production
waitress-serve app:app
All memes were retrieved from the top 1000 posts of all time on Reddit's meme subreddits using PRAW on the Reddit's API free tier.
Python is not my primary language and I'm new to machine learning, so I greatly appreciate and welcome constructive feedback!