mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 18:22:34 +06:00
update documentation (#19706)
This commit is contained in:
parent
fd9a027aca
commit
072dfdaee4
@ -1288,7 +1288,7 @@ class TFWhisperForConditionalGeneration(TFWhisperPreTrainedModel, TFCausalLangua
|
|||||||
|
|
||||||
>>> transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
>>> transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
||||||
>>> transcription
|
>>> transcription
|
||||||
' Mr. Quilter is the apostle of the middle classes, and we are glad to'
|
' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.'
|
||||||
```"""
|
```"""
|
||||||
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
||||||
|
|
||||||
|
@ -1178,7 +1178,7 @@ class WhisperForConditionalGeneration(WhisperPreTrainedModel):
|
|||||||
|
|
||||||
>>> transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
>>> transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
||||||
>>> transcription
|
>>> transcription
|
||||||
' Mr. Quilter is the apostle of the middle classes, and we are glad to'
|
' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.'
|
||||||
```"""
|
```"""
|
||||||
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
||||||
|
|
||||||
|
@ -76,11 +76,9 @@ class WhisperProcessor(ProcessorMixin):
|
|||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
When used in normal mode, this method forwards all its arguments to WhisperFeatureExtractor's
|
Forwards the `audio` argument to WhisperFeatureExtractor's [`~WhisperFeatureExtractor.__call__`] and the `text`
|
||||||
[`~WhisperFeatureExtractor.__call__`] and returns its output. If used in the context
|
argument to [`~WhisperTokenizer.__call__`]. Please refer to the doctsring of the above two methods for more
|
||||||
[`~WhisperProcessor.as_target_processor`] this method forwards all its arguments to WhisperTokenizer's
|
information.
|
||||||
[`~WhisperTokenizer.__call__`]. Please refer to the doctsring of the above two methods for more information.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# For backward compatibility
|
# For backward compatibility
|
||||||
if self._in_target_context_manager:
|
if self._in_target_context_manager:
|
||||||
|
Loading…
Reference in New Issue
Block a user