kevinwang676 commited on
Commit
50a3853
·
verified ·
1 Parent(s): 2693ee1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -350,9 +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(duration=10)
 
 
 
 
353
  def load_hubert():
354
  global hubert_model
355
- from fairseq import checkpoint_utils
 
356
  models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
357
  ["hubert_base.pt"],
358
  suffix="",
@@ -364,8 +369,9 @@ def load_hubert():
364
  else:
365
  hubert_model = hubert_model.float()
366
  hubert_model.eval()
367
- print(hubert_model)
368
 
 
369
  print(hubert_model)
370
 
371
  def rvc_models(model_name):
 
350
  return output_path
351
 
352
  @spaces.GPU(duration=10)
353
+ def import_fairseq():
354
+ global checkpoint_utils
355
+ from fairseq import checkpoint_utils
356
+
357
  def load_hubert():
358
  global hubert_model
359
+ #from fairseq import checkpoint_utils
360
+ import_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):