Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -55,7 +55,7 @@ class EndpointHandler:
|
|
| 55 |
generated_ids_trimmed = [
|
| 56 |
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
|
| 57 |
]
|
| 58 |
-
output_text = processor.batch_decode(
|
| 59 |
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 60 |
)
|
| 61 |
return output_text[0]
|
|
|
|
| 55 |
generated_ids_trimmed = [
|
| 56 |
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
|
| 57 |
]
|
| 58 |
+
output_text = self.processor.batch_decode(
|
| 59 |
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 60 |
)
|
| 61 |
return output_text[0]
|