Skip to content

Conversation

@antonum
Copy link
Contributor

@antonum antonum commented Oct 11, 2024

Address #232

Now **kwargs are being passed from hf.embed() and hf.embed_many() to the underlying model.encode()

from redisvl.utils.vectorize import HFTextVectorizer
from tqdm.auto import tqdm
hf = HFTextVectorizer(model="sentence-transformers/all-MiniLM-L6-v2")
# Embed a sentence
test = hf.embed("This is a test sentence.", show_progress_bar=True) #progress bar would show
test = hf.embed("This is a test sentence.") #progress bar would show (default behavior as before)
test = hf.embed("This is a test sentence.", show_progress_bar=False) #progress bar would NOT show

# Uncomment to see vector embedding output
print(test[:10])

@tylerhutcherson tylerhutcherson self-requested a review October 11, 2024 16:11
@tylerhutcherson tylerhutcherson added the enhancement New feature or request label Oct 11, 2024
Copy link
Collaborator

@tylerhutcherson tylerhutcherson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tylerhutcherson tylerhutcherson merged commit bdef909 into redis:main Oct 11, 2024
2 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants