cathyi commited on
Commit
f2b9f8f
·
1 Parent(s): 8f4ba23

update handler

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -39,7 +39,7 @@ class EndpointHandler():
39
  """
40
 
41
  inputs = data.pop("inputs", data)
42
- # with torch.cuda.amp.autocast():
43
- with torch.no_grad():
44
  prediction = self.pipeline(inputs, generate_kwargs={"forced_decoder_ids": self.forced_decoder_ids}, max_new_tokens=255)
 
45
  return prediction
 
39
  """
40
 
41
  inputs = data.pop("inputs", data)
42
+ with torch.cuda.amp.autocast():
 
43
  prediction = self.pipeline(inputs, generate_kwargs={"forced_decoder_ids": self.forced_decoder_ids}, max_new_tokens=255)
44
+ # prediction = self.pipeline(inputs, return_timestamps=False)
45
  return prediction