Uhhy commited on
Commit
c5feb16
1 Parent(s): 16b1212

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -53,8 +53,12 @@ MODEL = Xtts.init_from_config(config)
53
  MODEL.load_checkpoint(
54
  config, checkpoint_dir=checkpoint_dir, use_deepspeed=use_deepspeed
55
  )
 
56
  if torch.cuda.is_available():
57
- MODEL.cuda()
 
 
 
58
 
59
  supported_languages = config.languages
60
  if not "vi" in supported_languages:
 
53
  MODEL.load_checkpoint(
54
  config, checkpoint_dir=checkpoint_dir, use_deepspeed=use_deepspeed
55
  )
56
+
57
  if torch.cuda.is_available():
58
+ device = torch.device("cuda")
59
+ else:
60
+ device = torch.device("cpu")
61
+ MODEL.to(device)
62
 
63
  supported_languages = config.languages
64
  if not "vi" in supported_languages: