Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def translate_speech(audio_file_path):
|
|
38 |
text_inputs = translator_processor(text=transcription, src_lang="eng", return_tensors="pt")
|
39 |
|
40 |
# Use the translator model to translate the transcription
|
41 |
-
translated_text = translator_model.generate(**text_inputs, tgt_lang="
|
42 |
|
43 |
# Decode the translated text
|
44 |
translated_text_str = translator_processor.decode(translated_text[0])
|
|
|
38 |
text_inputs = translator_processor(text=transcription, src_lang="eng", return_tensors="pt")
|
39 |
|
40 |
# Use the translator model to translate the transcription
|
41 |
+
translated_text = translator_model.generate(**text_inputs, tgt_lang="hau") # Change the target language to Hausa
|
42 |
|
43 |
# Decode the translated text
|
44 |
translated_text_str = translator_processor.decode(translated_text[0])
|