Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Meme search engine built with Jina neural search framework. Search with captions or image files to find matching memes.

License

Notifications You must be signed in to change notification settings

jina-ai/example-meme-search

Repository files navigation

This repo is deprecated. This code will not run with recent versions of Jina!


Jina meme search

In this repo you can find three folders to help build your own meme search engine powered by Jina.

Each of these can be run independently. You can play with a live demo or notebook (text-search only) to get a feel for it.

Note

I'm still revamping the README's, so documentation might not be fully up-to-date for a little while.

Instructions

Set up

  • Create a virtual environment
  • python get_memes.py 200000 (where 200000 is the number of memes you want to download)

Text search

cd backend-text
pip install -r requirements.txt
python app.py -t index -n 1000   # Index 1000 memes
python app.py -t search          # Open RESTful gateway

Image search

Edit app.py to set number of memes to index.

cd backend-image
pip install -r requirements.txt
python app.py -t index -n 1000   # Index 1000 memes
python app.py -t search          # Open RESTful gateway

Frontend

cd frontend
pip install -r requirements.txt
streamlit app.py

Via docker-compose

Note: This opens up the search interfaces for meme search, including the frontend. It doesn't index the data. Be sure to do that beforehand.

  1. Follow instructions above for setup and indexing (don't query anything yet)
  2. In root dir, docker-compose up

Troubleshooting

Running out of memory

If you're on Linux you can create a swapfile:

dd if=/dev/zero of=swapfile bs=1M count=10240 status=progress   # 10240mb = 10gb
chmod 600 swapfile
mkswap swapfile
swapon swapfile