For this guide we are using the repositories from alexcg1 cloned on July 2, 2021:
This steps were tested on Linux (Ubuntu 20.04), this may work the same for Mac, for Windows 10 it is supposed to work on WSL or Docker but my experience dealing with configurations alone was painful and out of the scope for developing with Jina.
- Working installation of virtualenv
- Git
git clone https://github.com/alexcg1/jina-meme-search-image-backend
cd jina-meme-search-image-backend
virtualenv env --python=python3.8
source env/bin/activate
pip install -r requirements.txt
sh get_models.sh
sh get_data.sh
⚠️ Check on folder data that your memes.json file is more than 70 MB, if it isn't replace with file from Kaggle
python get_images.py 101
python app.py -t index -n 100
python app.py -t query_restful
For the front end, open a new Terminal at your base project folder, cd into it, create and activate virtual environment, install the requierements and launch the Streamlit application
git clone https://github.com/alexcg1/jina-meme-search-frontend
cd jina-meme-search-frontend
virtualenv env --python=python3.8
source env/bin/activate
pip install -r requirements.txt
streamlit run app.py
- Open a web browser with your streamlit URL
- Select the Image radio button
- Expand Settings, set your endpoint to the one your Jina service is using, i.e. http://localhost:45680/search and hit Enter
- Click Browse files and select an image to search (one from the data folder or others could be used for testing)
- Click Search