Update handler.py
Browse files- handler.py +2 -1
handler.py
CHANGED
|
@@ -22,7 +22,7 @@ class EndpointHandler:
|
|
| 22 |
# preprocess
|
| 23 |
print(print("inputs......", inputs))
|
| 24 |
inputs = self.tokenizer(inputs, return_tensors="pt").to(self.device)
|
| 25 |
-
|
| 26 |
|
| 27 |
|
| 28 |
|
|
@@ -36,6 +36,7 @@ class EndpointHandler:
|
|
| 36 |
|
| 37 |
|
| 38 |
# pass inputs with all kwargs in data
|
|
|
|
| 39 |
if parameters is not None:
|
| 40 |
outputs = self.model.generate(**inputs, **parameters)
|
| 41 |
else:
|
|
|
|
| 22 |
# preprocess
|
| 23 |
print(print("inputs......", inputs))
|
| 24 |
inputs = self.tokenizer(inputs, return_tensors="pt").to(self.device)
|
| 25 |
+
|
| 26 |
|
| 27 |
|
| 28 |
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
# pass inputs with all kwargs in data
|
| 39 |
+
print("inputs......", inputs)
|
| 40 |
if parameters is not None:
|
| 41 |
outputs = self.model.generate(**inputs, **parameters)
|
| 42 |
else:
|