Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def transcribe(audio_file_mic=None, audio_file_upload=None, language="Turkmen"):
|
|
27 |
speech = librosa.resample(speech, orig_sr=sample_rate, target_sr=16000)
|
28 |
|
29 |
# 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
|
30 |
-
language_code = ("Turkmen": "tuk-
|
31 |
processor.tokenizer.set_target_lang(language_code)
|
32 |
model.load_adapter(language_code)
|
33 |
|
|
|
27 |
speech = librosa.resample(speech, orig_sr=sample_rate, target_sr=16000)
|
28 |
|
29 |
# 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
|
30 |
+
language_code = ("Turkmen": "tuk-script_latin")
|
31 |
processor.tokenizer.set_target_lang(language_code)
|
32 |
model.load_adapter(language_code)
|
33 |
|