Pendrokar commited on
Commit
50319fb
β€’
1 Parent(s): 4dbbe42

load default model

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -58,8 +58,11 @@ def load_model():
58
  # model_json_path = hf_hub_download(repo_id=model_name, filename="ccby_nvidia_hifi_6670_M.json")
59
  model_path = '/tmp/hfcache/models--Pendrokar--xvapitch_nvidia_6670/snapshots/2e138a7c459fb1cb1182dd7bc66813f5325d30fd/ccby_nvidia_hifi_6670_M.pt'
60
  model_json_path = '/tmp/hfcache/models--Pendrokar--xvapitch_nvidia_6670/snapshots/2e138a7c459fb1cb1182dd7bc66813f5325d30fd/ccby_nvidia_hifi_6670_M.json'
61
- os.symlink(model_path, os.path.join('./models/ccby/', os.path.basename(model_path)))
62
- os.symlink(model_json_path, os.path.join('./models/ccby/', os.path.basename(model_json_path)))
 
 
 
63
 
64
  model_type = 'xVAPitch'
65
  language = 'en'
@@ -136,7 +139,7 @@ if __name__ == "__main__":
136
  web_server_thread.start()
137
 
138
  # load default voice model
139
- # load_model()
140
 
141
  # predicted = predict('test', 1.0)
142
  # print(predicted)
 
58
  # model_json_path = hf_hub_download(repo_id=model_name, filename="ccby_nvidia_hifi_6670_M.json")
59
  model_path = '/tmp/hfcache/models--Pendrokar--xvapitch_nvidia_6670/snapshots/2e138a7c459fb1cb1182dd7bc66813f5325d30fd/ccby_nvidia_hifi_6670_M.pt'
60
  model_json_path = '/tmp/hfcache/models--Pendrokar--xvapitch_nvidia_6670/snapshots/2e138a7c459fb1cb1182dd7bc66813f5325d30fd/ccby_nvidia_hifi_6670_M.json'
61
+ try:
62
+ os.symlink(model_path, os.path.join('./models/ccby/', os.path.basename(model_path)))
63
+ os.symlink(model_json_path, os.path.join('./models/ccby/', os.path.basename(model_json_path)))
64
+ except:
65
+ print('Failed creating symlinks, they probably already exist')
66
 
67
  model_type = 'xVAPitch'
68
  language = 'en'
 
139
  web_server_thread.start()
140
 
141
  # load default voice model
142
+ load_model()
143
 
144
  # predicted = predict('test', 1.0)
145
  # print(predicted)