Tom Aarsen commited on
Commit
61b3d16
1 Parent(s): 4d6f3df

Add convert_to_tensor=True to fix predict/rank until the next ST release

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -189,7 +189,7 @@ scores = model.predict(sentence_pairs, convert_to_tensor=True).tolist()
189
  [0.828125, 0.0927734375, 0.6328125, 0.08251953125, 0.76171875, 0.099609375, 0.92578125, 0.058349609375, 0.84375, 0.111328125]
190
  """
191
 
192
- rankings = model.rank(query, documents, return_documents=True)
193
  print(f"Query: {query}")
194
  for ranking in rankings:
195
  print(f"ID: {ranking['corpus_id']}, Score: {ranking['score']:.4f}, Text: {ranking['text']}")
 
189
  [0.828125, 0.0927734375, 0.6328125, 0.08251953125, 0.76171875, 0.099609375, 0.92578125, 0.058349609375, 0.84375, 0.111328125]
190
  """
191
 
192
+ rankings = model.rank(query, documents, return_documents=True, convert_to_tensor=True)
193
  print(f"Query: {query}")
194
  for ranking in rankings:
195
  print(f"ID: {ranking['corpus_id']}, Score: {ranking['score']:.4f}, Text: {ranking['text']}")