cathyi commited on
Commit
b291dd7
·
1 Parent(s): 20f594c

update handler

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -44,4 +44,4 @@ class EndpointHandler():
44
  inputs = data.pop("inputs", data)
45
  with torch.cuda.amp.autocast():
46
  prediction = self.pipeline(inputs, generate_kwargs={"forced_decoder_ids": self.forced_decoder_ids}, max_new_tokens=255)["text"]
47
- return {"prediction": prediction}
 
44
  inputs = data.pop("inputs", data)
45
  with torch.cuda.amp.autocast():
46
  prediction = self.pipeline(inputs, generate_kwargs={"forced_decoder_ids": self.forced_decoder_ids}, max_new_tokens=255)["text"]
47
+ return prediction