andrewluo commited on
Commit
b50421a
1 Parent(s): f44ab2c

Update handler.py

Browse files
Files changed (1) hide show
  1. 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
- output = self.model(**tokens)
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]