Update app.py
Browse files
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 =
|
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')
|