jhj0517 commited on
Commit
d5e37cc
·
1 Parent(s): 71e7964

Fix language key bug

Browse files
modules/whisper/base_transcription_pipeline.py CHANGED
@@ -492,7 +492,7 @@ class BaseTranscriptionPipeline(ABC):
492
  params.whisper.lang = None
493
  else:
494
  language_code_dict = {value: key for key, value in whisper.tokenizer.LANGUAGES.items()}
495
- params.whisper.lang = language_code_dict[params.lang]
496
 
497
  if params.whisper.initial_prompt == GRADIO_NONE_STR:
498
  params.whisper.initial_prompt = None
 
492
  params.whisper.lang = None
493
  else:
494
  language_code_dict = {value: key for key, value in whisper.tokenizer.LANGUAGES.items()}
495
+ params.whisper.lang = language_code_dict[params.whisper.lang]
496
 
497
  if params.whisper.initial_prompt == GRADIO_NONE_STR:
498
  params.whisper.initial_prompt = None