hhguo commited on
Commit
a78f1e0
·
1 Parent(s): b02307e
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -14,12 +14,13 @@ def download_file(url, filename):
14
  print(f"Failed to download file: HTTP {response.status_code}")
15
 
16
 
17
- download_file('https://huggingface.co/fireredteam/FireRedTTS/resolve/main/fireredtts_gpt.pt',
18
- 'pretrained_models/fireredtts_gpt.pt')
19
- download_file('https://huggingface.co/fireredteam/FireRedTTS/resolve/main/fireredtts_speaker.bin',
20
- 'pretrained_models/fireredtts_speaker.bin')
21
- download_file('https://huggingface.co/fireredteam/FireRedTTS/resolve/main/fireredtts_token2wav.pt',
22
- 'pretrained_models/fireredtts_token2wav.pt')
 
23
 
24
 
25
  tts = FireRedTTS(
 
14
  print(f"Failed to download file: HTTP {response.status_code}")
15
 
16
 
17
+ if not os.path.exists('pretrained_models/fireredtts_gpt.pt'):
18
+ download_file('https://huggingface.co/fireredteam/FireRedTTS/resolve/main/fireredtts_gpt.pt',
19
+ 'pretrained_models/fireredtts_gpt.pt')
20
+ download_file('https://huggingface.co/fireredteam/FireRedTTS/resolve/main/fireredtts_speaker.bin',
21
+ 'pretrained_models/fireredtts_speaker.bin')
22
+ download_file('https://huggingface.co/fireredteam/FireRedTTS/resolve/main/fireredtts_token2wav.pt',
23
+ 'pretrained_models/fireredtts_token2wav.pt')
24
 
25
 
26
  tts = FireRedTTS(