Skip to content

Instantly share code, notes, and snippets.

@davidmezzetti
Created October 21, 2024 18:11
Show Gist options
  • Save davidmezzetti/56c99960e4f6e8103846a7a9d4d003f7 to your computer and use it in GitHub Desktop.
Save davidmezzetti/56c99960e4f6e8103846a7a9d4d003f7 to your computer and use it in GitHub Desktop.
from txtai import Embeddings
embeddings = Embeddings(
method="model2vec",
path="minishlab/M2V_base_output"
)
embeddings.index(["test"])
embeddings.search("test")
# [(0, 1.0)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment