Spaces:
Runtime error
Runtime error
Commit
·
2c7e789
1
Parent(s):
91e84de
Minor bug fix
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ transcribe_token_id = all_special_ids[-5]
|
|
24 |
translate_token_id = all_special_ids[-6]
|
25 |
|
26 |
def translate_or_transcribe(audio, task):
|
27 |
-
whisper_model.model.config.forced_decoder_ids = [[2, transcribe_token_id if task=="
|
28 |
text = whisper_model(audio)["text"]
|
29 |
return text
|
30 |
|
|
|
24 |
translate_token_id = all_special_ids[-6]
|
25 |
|
26 |
def translate_or_transcribe(audio, task):
|
27 |
+
whisper_model.model.config.forced_decoder_ids = [[2, transcribe_token_id if task=="Transcribe in Spoken Language" else translate_token_id]]
|
28 |
text = whisper_model(audio)["text"]
|
29 |
return text
|
30 |
|