Spaces:
Runtime error
Runtime error
RayCappola
commited on
Commit
•
bfa1cec
1
Parent(s):
81d13c0
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def get_hidden_states(encoded, model):
|
|
28 |
return output.mean(dim=0)
|
29 |
|
30 |
def get_word_vector(sent, tokenizer, model):
|
31 |
-
encoded = tokenizer.encode_plus(sent, return_tensors="pt")
|
32 |
|
33 |
return get_hidden_states(encoded, model)
|
34 |
|
|
|
28 |
return output.mean(dim=0)
|
29 |
|
30 |
def get_word_vector(sent, tokenizer, model):
|
31 |
+
encoded = tokenizer.encode_plus(sent, return_tensors="pt", truncation=True)
|
32 |
|
33 |
return get_hidden_states(encoded, model)
|
34 |
|