`model.predict` instead of `model.rank`

#3
by yitao416 - opened

from sentence_transformers.cross_encoder import CrossEncoder

model = CrossEncoder("model_name_or_path")
scores = model.predict([["My first", "sentence pair"], ["Second text", "pair"]])

Mixedbread org
edited Mar 5

Hey, the .rank() function was recently added. Please update your sentence-transformers version: pip install -U sentence-transformers . Then it should work without issues.

Aamir.

Thanks for the update!

yitao416 changed discussion status to closed

Sign up or log in to comment