johngiorgi commited on
Commit
2ce3cc6
1 Parent(s): 96b4361

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(