kevinwang676 commited on
Commit
ca05ee5
·
verified ·
1 Parent(s): 51d4989

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -350,10 +350,14 @@ def combine_vocal_and_inst(model_name, song_name, song_id, split_model, cover_so
350
  return output_path
351
 
352
  @spaces.GPU()
353
- def load_hubert():
354
- global hubert_model
355
  from fairseq import checkpoint_utils
356
 
 
 
 
 
 
357
  models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
358
  ["hubert_base.pt"],
359
  suffix="",
@@ -365,9 +369,9 @@ def load_hubert():
365
  else:
366
  hubert_model = hubert_model.float()
367
  hubert_model.eval()
368
- print(hubert_model)
369
 
370
- load_hubert()
371
  print(hubert_model)
372
 
373
  def rvc_models(model_name):
 
350
  return output_path
351
 
352
  @spaces.GPU()
353
+ def load_fairseq():
 
354
  from fairseq import checkpoint_utils
355
 
356
+
357
+ def load_hubert():
358
+ global hubert_model
359
+ #from fairseq import checkpoint_utils
360
+ load_fairseq()
361
  models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
362
  ["hubert_base.pt"],
363
  suffix="",
 
369
  else:
370
  hubert_model = hubert_model.float()
371
  hubert_model.eval()
372
+ return hubert_model
373
 
374
+ hubert_model = load_hubert()
375
  print(hubert_model)
376
 
377
  def rvc_models(model_name):