AlexHung29629
commited on
Commit
•
5509967
1
Parent(s):
97b6fc6
Update ultravox_processing.py
Browse files- ultravox_processing.py +1 -1
ultravox_processing.py
CHANGED
@@ -185,7 +185,7 @@ class UltravoxProcessor(transformers.ProcessorMixin):
|
|
185 |
text = [t.replace(self.audio_placeholder, self.audio_token_replacement * data["audio_token_len"][i]) for i, t in enumerate(text)]
|
186 |
|
187 |
# Special tokens like BOS should already have been added by the caller.
|
188 |
-
data.update(self.tokenizer(text, add_special_tokens=False, **kwargs))
|
189 |
|
190 |
return transformers.BatchFeature(data=data, tensor_type=return_tensors)
|
191 |
|
|
|
185 |
text = [t.replace(self.audio_placeholder, self.audio_token_replacement * data["audio_token_len"][i]) for i, t in enumerate(text)]
|
186 |
|
187 |
# Special tokens like BOS should already have been added by the caller.
|
188 |
+
data.update(self.tokenizer(text, add_special_tokens=False, padding=True, **kwargs))
|
189 |
|
190 |
return transformers.BatchFeature(data=data, tensor_type=return_tensors)
|
191 |
|