prasanacodes commited on
Commit
e648d70
·
verified ·
1 Parent(s): 0631173

Update app.py

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