tylerhutcherson / redis-vector-search

A simple application for computing visual and semantic vector similiarty with Redis Stack, FastAPI, PyTorch and Huggingface.

Home Page:https://redisvss.partee.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redis Vector Search Demo Application

This demo showcases the vector search similarity (VSS) capability within Redis Stack and Redis Enterprise. Through the RediSearch module, vector types and indexes can be added to Redis. This turns Redis into a highly performant vector database which can be used for all types of applications.

The following Redis Stack capabilities are available in this demo:

  • Vector Similarity Search
    • by image
    • by text
  • Multiple vector indexing types
    • HNSW
    • Flat (brute-force)
  • Hybrid Queries
    • Apply tags as pre-filter for vector search
  • Full text search
  • JSON storage

Application

This app was built as a Single Page Application (SPA) with the following components:

Some inspiration was taken from this Cookiecutter project and turned into a SPA application instead of a separate front-end server approach.

Datasets

The dataset was taken from the the following Kaggle links.

Running Locally

Using pre-built containers

The easiest option to run locally is to use the following docker-compose file to launch the prebuilt container hosted on GitHub.

version: '3.7'
services:

  redis-vector-db:
    image: redis/redis-stack:latest
    ports:
      - 6379:6379
      - 8001:8001

  backend:
    image: ghcr.io/spartee/redis-vss-fashion:v0.2.0
    environment:
      DEPLOYMENT: "dev"
      REDIS_DATA_URL: 'redis://redis-vector-db:6379'
      REDIS_OM_URL: 'redis://redis-vector-db:6379'
      REDIS_HOST: 'redis-vector-db'
      REDIS_PORT: 6379
    expose:
      - "8888"
    ports:
      - "8888:8888"
    depends_on:
      - "redis-vector-db"

To launch, run the following

  • docker compose up in same directory as docker-compose.yml
  • Navigate to 0.0.0.0:8888 in a browser

Building the containers

More to come here

Running outside docker

More to come here

About

A simple application for computing visual and semantic vector similiarty with Redis Stack, FastAPI, PyTorch and Huggingface.

https://redisvss.partee.io

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Jupyter Notebook 61.6%Language:TypeScript 21.4%Language:Python 15.2%Language:HTML 1.0%Language:Dockerfile 0.4%Language:JavaScript 0.4%Language:Shell 0.0%