Spaces:
Runtime error
Runtime error
Update app.py
#4
by
marigold334
- opened
app.py
CHANGED
@@ -14,7 +14,7 @@ st.set_page_config(
|
|
14 |
class TTS:
|
15 |
def __init__(self, model_variant):
|
16 |
global device
|
17 |
-
device = torch.device(
|
18 |
torch.cuda.manual_seed(1234) if torch.cuda.is_available() else None
|
19 |
self.flowgenerator = Glow_model(n_vocab = 70, h_c= 192, f_c = 768, f_c_dp = 256, out_c = 80, k_s = 3, k_s_dec = 5, heads=2, layers_enc = 6).to(device)
|
20 |
self.voicegenerator = GAN_model().to(device)
|
|
|
14 |
class TTS:
|
15 |
def __init__(self, model_variant):
|
16 |
global device
|
17 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
18 |
torch.cuda.manual_seed(1234) if torch.cuda.is_available() else None
|
19 |
self.flowgenerator = Glow_model(n_vocab = 70, h_c= 192, f_c = 768, f_c_dp = 256, out_c = 80, k_s = 3, k_s_dec = 5, heads=2, layers_enc = 6).to(device)
|
20 |
self.voicegenerator = GAN_model().to(device)
|