Skip to content

Instantly share code, notes, and snippets.

@davidmezzetti
Last active August 18, 2021 14:51
Show Gist options
  • Save davidmezzetti/abb334da876d66ead39ce54df90afe6f to your computer and use it in GitHub Desktop.
Save davidmezzetti/abb334da876d66ead39ce54df90afe6f to your computer and use it in GitHub Desktop.
from txtai.embeddings import Embeddings
embeddings = Embeddings({"method": "sentence-transformers", "path": "clip-ViT-B-32"})
embeddings.index(images(directory))
embeddings.search(query, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment