prasanacodes commited on
Commit
fe934fc
·
verified ·
1 Parent(s): 9816f80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -177,7 +177,7 @@ def synthesize_speech(synth_text, target_lang, gender="Male", pace="normal", out
177
  print("> Loading IndicF5 TTS model (ai4bharat/IndicF5)...")
178
  indicf5_repo_id = "ai4bharat/IndicF5"
179
  token = os.environ.get("HF_TOKEN")
180
- tts_model = AutoModel.from_pretrained(indicf5_repo_id, token=token, trust_remote_code=True)
181
 
182
  audio = tts_model(synth_text, ref_audio_path=ref_audio_path, ref_text=ref_text)
183
 
 
177
  print("> Loading IndicF5 TTS model (ai4bharat/IndicF5)...")
178
  indicf5_repo_id = "ai4bharat/IndicF5"
179
  token = os.environ.get("HF_TOKEN")
180
+ tts_model = AutoModel.from_pretrained(indicf5_repo_id, token=token, trust_remote_code=True).to(device)
181
 
182
  audio = tts_model(synth_text, ref_audio_path=ref_audio_path, ref_text=ref_text)
183