ford442 commited on
Commit
a21b995
·
verified ·
1 Parent(s): fb908dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,8 +19,8 @@ translate_token_id = all_special_ids[-6]
19
 
20
  # --- FastSpeech2 (TTS) Setup ---
21
  TTS_MODEL_NAME = "facebook/fastspeech2-en-ljspeech"
22
- tts_processor = AutoProcessor.from_pretrained(TTS_MODEL_NAME)
23
- tts_model = SpeechEncoderDecoderModel.from_pretrained(TTS_MODEL_NAME)
24
  tts_device = "cuda" if torch.cuda.is_available() else "cpu" # Use CUDA if available
25
  tts_model = tts_model.to(tts_device)
26
 
 
19
 
20
  # --- FastSpeech2 (TTS) Setup ---
21
  TTS_MODEL_NAME = "facebook/fastspeech2-en-ljspeech"
22
+ tts_processor = AutoProcessor.from_pretrained(TTS_MODEL_NAME, trust_remote_code=True)
23
+ tts_model = SpeechEncoderDecoderModel.from_pretrained(TTS_MODEL_NAME, trust_remote_code=True)
24
  tts_device = "cuda" if torch.cuda.is_available() else "cpu" # Use CUDA if available
25
  tts_model = tts_model.to(tts_device)
26