ak3ra commited on
Commit
b95afd5
·
1 Parent(s): 681b7ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ def transcribe(audio_file_mic=None, audio_file_upload=None, language="Luganda (l
30
  speech = librosa.resample(speech, orig_sr=sample_rate, target_sr=16000)
31
 
32
  # Keep the same model in memory and simply switch out the language adapters by calling load_adapter() for the model and set_target_lang() for the tokenizer
33
- language_code = languages[language]
34
  processor.tokenizer.set_target_lang(language_code)
35
  model.load_adapter(language_code)
36
 
 
30
  speech = librosa.resample(speech, orig_sr=sample_rate, target_sr=16000)
31
 
32
  # Keep the same model in memory and simply switch out the language adapters by calling load_adapter() for the model and set_target_lang() for the tokenizer
33
+ language_code = language
34
  processor.tokenizer.set_target_lang(language_code)
35
  model.load_adapter(language_code)
36