johngiorgi commited on
Commit
036aa4d
1 Parent(s): b4f42d1

Update call to forward pass to match latest API

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -31,7 +31,7 @@ inputs = tokenizer(text, padding=True, truncation=True, return_tensors="pt")
31
 
32
  # Embed the text
33
  with torch.no_grad():
34
- sequence_output, _ = model(**inputs, output_hidden_states=False)
35
 
36
  # Mean pool the token-level embeddings to get sentence-level embeddings
37
  embeddings = torch.sum(
 
31
 
32
  # Embed the text
33
  with torch.no_grad():
34
+ sequence_output = model(**inputs)[0]
35
 
36
  # Mean pool the token-level embeddings to get sentence-level embeddings
37
  embeddings = torch.sum(