POST /items
{
"imageUrl": "https://picsum.photos/1000.jpg",
"sku": "SKU"
}
GET /similar-skus
?imageUrl=https://picsum.photos/1000.jpg
Response:
{
"similarSkus": [{
"sku": "sku",
"score": 0.5
}]
}
Web Client:
cd public
npm i
npm run build
Server:
pip3 install -r requirments.txt
export FLASK_APP=server.py
flask run
Redis:
- build RedisAI
- clone the repository
- run
make
- copy
./src/redisai.so
- build RedisGears
- clone the repository
- run
make
- copy
./src/redisgears.so
- build VecSim
- clone the repository
- open
./src/vector_similarity.c
- change
#define VEC_SIZE
(line 20) value to1280
- change
#define VEC_HOLDER_SIZE
(line 22) value to100 * 1024
- run
make
- copy
./src/vector_similarity.so
- run
redis-server --loadmodule ./redisai.so --loadmodule ./redisgears.so Plugin ./vector_similarity.so