Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
a0f7c4a4
Unverified
Commit
a0f7c4a4
authored
Dec 04, 2023
by
Sanchit Gandhi
Committed by
GitHub
Dec 04, 2023
Browse files
[Whisper] Fix doctest in timestamp logits processor (#27795)
parent
ede09d67
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/generation/logits_process.py
src/transformers/generation/logits_process.py
+1
-1
No files found.
src/transformers/generation/logits_process.py
View file @
a0f7c4a4
...
...
@@ -1503,7 +1503,7 @@ class WhisperTimeStampLogitsProcessor(LogitsProcessor):
>>> #Displaying timestamps
>>> generated_ids = model.generate(inputs=input_features, return_timestamps=True)
>>> transcription = processor.batch_decode(generated_ids,
skip_special_tokens=Fals
e)[0]
>>> transcription = processor.batch_decode(generated_ids,
decode_with_timestamps=Tru
e)[0]
>>> print("Transcription:", transcription)
Transcription: <|startoftranscript|><|0.00|> He has grave doubts whether Sir Frederick Layton's work is really Greek after all, and can<|6.44|><|6.44|> discover in it but little of rocky Ithaca.<|9.44|><|endoftext|>
...
...
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