Kangarroar commited on
Commit
2c09dca
1 Parent(s): 3b00b6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -1,5 +1,3 @@
1
- import os
2
- os.environ["CUDA_VISIBLE_DEVICES"] = ""
3
  from utils.hparams import hparams
4
  from preprocessing.data_gen_utils import get_pitch_parselmouth,get_pitch_crepe
5
  import numpy as np
@@ -11,7 +9,7 @@ import torchcrepe
11
  from infer import *
12
  import logging
13
  from infer_tools.infer_tool import *
14
- map_location = torch.device("cpu")
15
 
16
  ##EDIT FOR CPU
17
  # Open the file and read it into a string
 
 
 
1
  from utils.hparams import hparams
2
  from preprocessing.data_gen_utils import get_pitch_parselmouth,get_pitch_crepe
3
  import numpy as np
 
9
  from infer import *
10
  import logging
11
  from infer_tools.infer_tool import *
12
+ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
13
 
14
  ##EDIT FOR CPU
15
  # Open the file and read it into a string