example meme search
1.0.0
在此存储库中,您可以找到三个文件夹来帮助构建由Jina提供动力的模因搜索引擎。
这些都可以独立运行。您可以使用现场演示或笔记本(仅文本搜索)来获得感觉。
我仍在修改读书文件,因此文档可能不会完全最新。
python get_memes.py 200000 (其中200000是您要下载的模因数) 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 编辑app.py将模因数设置为索引。
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 cd frontend
pip install -r requirements.txt
streamlit app.pydocker-compose注意:这为模因搜索(包括前端)打开了搜索接口。它没有索引数据。请确保事先做到这一点。
docker-compose up 如果您在Linux上,您可以创建一个交换费:
dd if=/dev/zero of=swapfile bs=1M count=10240 status=progress # 10240mb = 10gb
chmod 600 swapfile
mkswap swapfile
swapon swapfile