Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -21,7 +21,7 @@ class EndpointHandler():
|
|
21 |
# get inputs
|
22 |
text = data.pop("text", data)
|
23 |
tokens = self.tokenizer(text, return_tensors='pt', padding=True)
|
24 |
-
|
25 |
results = []
|
26 |
for idx, x in enumerate(outputs.logits):
|
27 |
mask = tokens.attention_mask[idx]
|
|
|
21 |
# get inputs
|
22 |
text = data.pop("text", data)
|
23 |
tokens = self.tokenizer(text, return_tensors='pt', padding=True)
|
24 |
+
outputs = self.model(**tokens)
|
25 |
results = []
|
26 |
for idx, x in enumerate(outputs.logits):
|
27 |
mask = tokens.attention_mask[idx]
|