Skip to content

Commit

Permalink
[Whisper] Fix doctest in timestamp logits processor (#27795)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit-gandhi committed Dec 4, 2023
1 parent ede09d6 commit a0f7c4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/generation/logits_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=False)[0]
>>> transcription = processor.batch_decode(generated_ids, decode_with_timestamps=True)[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|>
Expand Down

0 comments on commit a0f7c4a

Please sign in to comment.