Changes
4 changed files (+14/-3)
-
-
@@ -8,7 +8,7 @@ Install it using `pipx install git+https://git.unnamed.website/search/` or `uv tool install git+https://git.unnamed.website/search/`. For Intel GPU support, install OpenCL drivers (for example `intel-compute-runtime`) and run `uv tool install git+https://git.unnamed.website/search/[intel_gpu]`, although you may need to add the flag `-p 3.12` or some other Python version if dependency resolution fails.## Usage This program uses a client-server architecture to watch directories with inotify and keep the model in memory so the client doesn't have to wait several seconds to load the model. It uses file inodes and modification times to avoid unnecessary re-indexing. Additionally, the client only depends on the Python standard library. This program uses a client-server architecture to watch directories with inotify and keep the model in memory so the client doesn't have to wait several seconds to load the model. It uses file inodes and modification times to avoid unnecessary re-indexing. Run `search-server DIRS_TO_INDEX` to start the server. Make sure you don't include nested directories or weird stuff will happen. The server currently only indexes images although more modalities may be supported in the future. There are probably some weird race condition bugs if you modify a lot of files at the same time.
-
-
-
@@ -19,7 +19,7 @@ ][project.scripts] search-server = "search:server" search-client = "search:client" search-client = "search:client.main" [tool.uv] package = true
-
-
-
@@ -29,3 +29,14 @@ # for imgpath in res:# print(imgpath) # c = converter.SixelConverter(imgpath, h=50, w=50) # c.write(sys.stdout) def main(): # TODO: This seems like a weird hack # There's got to be a better way to get around the problem # sys.exit(client()) # ^^^^^^^^ # TypeError: 'module' object is not callable # when I make the entrypoint in pyproject.toml just search:client pass
-
-
-
@@ -12,7 +12,7 @@ from platformdirs import PlatformDirsfrom watchdog.events import FileOpenedEvent, FileSystemEventHandler from watchdog.observers import Observer from .model import embed_text, embed_image from .model import embed_image, embed_text from .unixsocket import UnixStreamXMLRPCServer DIM = 768
-