Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
072dfdae
Unverified
Commit
072dfdae
authored
Oct 18, 2022
by
Arthur
Committed by
GitHub
Oct 18, 2022
Browse files
update documentation (#19706)
parent
fd9a027a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
src/transformers/models/whisper/modeling_tf_whisper.py
src/transformers/models/whisper/modeling_tf_whisper.py
+1
-1
src/transformers/models/whisper/modeling_whisper.py
src/transformers/models/whisper/modeling_whisper.py
+1
-1
src/transformers/models/whisper/processing_whisper.py
src/transformers/models/whisper/processing_whisper.py
+3
-5
No files found.
src/transformers/models/whisper/modeling_tf_whisper.py
View file @
072dfdae
...
...
@@ -1288,7 +1288,7 @@ class TFWhisperForConditionalGeneration(TFWhisperPreTrainedModel, TFCausalLangua
>>> transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
>>> 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
...
...
src/transformers/models/whisper/modeling_whisper.py
View file @
072dfdae
...
...
@@ -1178,7 +1178,7 @@ class WhisperForConditionalGeneration(WhisperPreTrainedModel):
>>> transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
>>> 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
...
...
src/transformers/models/whisper/processing_whisper.py
View file @
072dfdae
...
...
@@ -76,11 +76,9 @@ class WhisperProcessor(ProcessorMixin):
def
__call__
(
self
,
*
args
,
**
kwargs
):
"""
When used in normal mode, this method forwards all its arguments to WhisperFeatureExtractor's
[`~WhisperFeatureExtractor.__call__`] and returns its output. If used in the context
[`~WhisperProcessor.as_target_processor`] this method forwards all its arguments to WhisperTokenizer's
[`~WhisperTokenizer.__call__`]. Please refer to the doctsring of the above two methods for more information.
Forwards the `audio` argument to WhisperFeatureExtractor's [`~WhisperFeatureExtractor.__call__`] and the `text`
argument to [`~WhisperTokenizer.__call__`]. Please refer to the doctsring of the above two methods for more
information.
"""
# For backward compatibility
if
self
.
_in_target_context_manager
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment