Hilley commited on
Commit
5de69a4
1 Parent(s): 07a6ec1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -75,9 +75,7 @@ def chat_tts(text, temperature, top_P, top_K, audio_seed_input, text_seed_input,
75
 
76
  ckpt_base_en = 'checkpoints/base_speakers/EN'
77
  ckpt_converter_en = 'checkpoints/converter'
78
- device = 'cuda:0'
79
-
80
- #device = "cpu"
81
 
82
  base_speaker_tts = BaseSpeakerTTS(f'{ckpt_base_en}/config.json', device=device)
83
  base_speaker_tts.load_ckpt(f'{ckpt_base_en}/checkpoint.pth')
 
75
 
76
  ckpt_base_en = 'checkpoints/base_speakers/EN'
77
  ckpt_converter_en = 'checkpoints/converter'
78
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
 
 
79
 
80
  base_speaker_tts = BaseSpeakerTTS(f'{ckpt_base_en}/config.json', device=device)
81
  base_speaker_tts.load_ckpt(f'{ckpt_base_en}/checkpoint.pth')