Deepakvictor commited on
Commit
a1a19b0
1 Parent(s): 6354431

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -1
handler.py CHANGED
@@ -9,7 +9,8 @@ class EndpointHandler():
9
 
10
  def __call__(self, data: str) -> str:
11
  inputs = data.pop("inputs", data)
12
- inp = self.tokenizer("thalaivaru Nirantharam", return_tensors="pt")
 
13
  with torch.inference_mode():
14
  out= self.model.generate(**inp)
15
  final_output = self.tokenizer.batch_decode(out,skip_special_tokens=True)
 
9
 
10
  def __call__(self, data: str) -> str:
11
  inputs = data.pop("inputs", data)
12
+ parameters = data.pop("parameters", None)
13
+ inp = self.tokenizer(inputs, return_tensors="pt")
14
  with torch.inference_mode():
15
  out= self.model.generate(**inp)
16
  final_output = self.tokenizer.batch_decode(out,skip_special_tokens=True)