aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 443cc5b5a855b4a58c150b2a6afd0701f45a85cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# search

Semantic file search using ImageBind and sqlite-vec

## Installation

```
pip install -r requirements.txt
```

If you don't need PyTorch with GPU support, first run `pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu`. During runtime, if you get the error `ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'`, change `functional_tensor` to `functional`.

## Usage

This program uses a client-server architecture to watch directories with inotify and keep the model loaded in memory. It takes around 15 seconds to load the model so it wouldn't be great if every query had to wait on that.

Run `python server.py DIRS_TO_INDEX` to start the server. Then, run `python client.py SEARCH_TEXT NUM_RESULTS` to get a list of the most similar files.