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