Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -21,7 +21,7 @@ class EndpointHandler():
|
|
21 |
Return:
|
22 |
A :obj:`list` | `dict`: will be serialized and returned
|
23 |
"""
|
24 |
-
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
25 |
# Compute token embeddings
|
26 |
with torch.no_grad():
|
27 |
model_output = self.model(**encoded_input)
|
|
|
21 |
Return:
|
22 |
A :obj:`list` | `dict`: will be serialized and returned
|
23 |
"""
|
24 |
+
encoded_input = self.tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
25 |
# Compute token embeddings
|
26 |
with torch.no_grad():
|
27 |
model_output = self.model(**encoded_input)
|