Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,8 @@ whisper_model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-
|
|
30 |
tts_processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
31 |
tts_model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
|
32 |
|
33 |
-
|
|
|
34 |
translation_tokenizer = MarianTokenizer.from_pretrained(translation_model_name)
|
35 |
translation_model = MarianMTModel.from_pretrained(translation_model_name).to(device)
|
36 |
|
|
|
30 |
tts_processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
31 |
tts_model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
|
32 |
|
33 |
+
# Usar um modelo alternativo de tradução
|
34 |
+
translation_model_name = "Helsinki-NLP/opus-mt-tc-big-en-pt"
|
35 |
translation_tokenizer = MarianTokenizer.from_pretrained(translation_model_name)
|
36 |
translation_model = MarianMTModel.from_pretrained(translation_model_name).to(device)
|
37 |
|