Deepakvictor
commited on
Commit
•
13fdbce
1
Parent(s):
9cad3da
Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -14,6 +14,6 @@ class EndpointHandler:
|
|
14 |
for q in inp:
|
15 |
inp[q] = inp[q].to(device)
|
16 |
with torch.inference_mode():
|
17 |
-
out= model.generate(**inp)
|
18 |
-
final_output = tokenizer.batch_decode(out,skip_special_tokens=True)
|
19 |
return {"translation": final_output[0]}
|
|
|
14 |
for q in inp:
|
15 |
inp[q] = inp[q].to(device)
|
16 |
with torch.inference_mode():
|
17 |
+
out= self.model.generate(**inp)
|
18 |
+
final_output = self.tokenizer.batch_decode(out,skip_special_tokens=True)
|
19 |
return {"translation": final_output[0]}
|