jahuerta92
commited on
Commit
•
e2a08d0
1
Parent(s):
ae07e55
Update README.md
Browse files
README.md
CHANGED
@@ -16,7 +16,8 @@ examples = ['My text 1', 'This is another text']
|
|
16 |
def extract_embeddings(texts):
|
17 |
encoded_texts = tokenizer(texts)
|
18 |
with torch.no_grad():
|
19 |
-
style_embeddings = model(encoded_texts.input_ids,
|
|
|
20 |
return style_embeddings
|
21 |
|
22 |
print(extract_embeddings(examples))
|
|
|
16 |
def extract_embeddings(texts):
|
17 |
encoded_texts = tokenizer(texts)
|
18 |
with torch.no_grad():
|
19 |
+
style_embeddings = model(encoded_texts.input_ids,
|
20 |
+
attention_mask=encoded_texts.attention_mask).pooler_output
|
21 |
return style_embeddings
|
22 |
|
23 |
print(extract_embeddings(examples))
|