Cyrile commited on
Commit
ab7e019
·
verified ·
1 Parent(s): afb2852

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -65,7 +65,7 @@ from scipy.spatial.distance import cdist
65
  retriever = pipeline('feature-extraction', 'cmarkea/bloomz-560m-retriever')
66
 
67
  # Inportant: take only last token!
68
- infer = lambda x: [ii[0][-1] for ii in retriever(x)]
69
 
70
  list_of_contexts = [...]
71
  emb_contexts = np.concatenate(infer(list_of_contexts), axis=0)
 
65
  retriever = pipeline('feature-extraction', 'cmarkea/bloomz-560m-retriever')
66
 
67
  # Inportant: take only last token!
68
+ infer = lambda x: [np.array(ii[0][-1]).reshape(1,-1) for ii in retriever(x)]
69
 
70
  list_of_contexts = [...]
71
  emb_contexts = np.concatenate(infer(list_of_contexts), axis=0)