Update handler.py
Browse files- handler.py +2 -0
handler.py
CHANGED
@@ -37,6 +37,8 @@ class EndpointHandler():
|
|
37 |
Return:
|
38 |
A :obj:`list` | `dict`: will be serialized and returned
|
39 |
"""
|
|
|
|
|
40 |
for sentence in sentences:
|
41 |
encoded_input = self.tokenizer(sentence, padding=True, truncation=True, return_tensors='pt')
|
42 |
# Compute token embeddings
|
|
|
37 |
Return:
|
38 |
A :obj:`list` | `dict`: will be serialized and returned
|
39 |
"""
|
40 |
+
sentences = data.pop("inputs",data)
|
41 |
+
sentence_embeddings = []
|
42 |
for sentence in sentences:
|
43 |
encoded_input = self.tokenizer(sentence, padding=True, truncation=True, return_tensors='pt')
|
44 |
# Compute token embeddings
|