Spaces:
Runtime error
Runtime error
kevinwang676
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -349,14 +349,11 @@ def combine_vocal_and_inst(model_name, song_name, song_id, split_model, cover_so
|
|
349 |
print(result.stdout.decode())
|
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 |
-
|
360 |
import_fairseq()
|
361 |
models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
|
362 |
["hubert_base.pt"],
|
@@ -369,6 +366,7 @@ def load_hubert():
|
|
369 |
else:
|
370 |
hubert_model = hubert_model.float()
|
371 |
hubert_model.eval()
|
|
|
372 |
return hubert_model
|
373 |
|
374 |
hubert_model = load_hubert()
|
|
|
349 |
print(result.stdout.decode())
|
350 |
return output_path
|
351 |
|
352 |
+
global hubert_model
|
353 |
@spaces.GPU(duration=10)
|
|
|
|
|
|
|
|
|
354 |
def load_hubert():
|
355 |
+
#global hubert_model
|
356 |
+
from fairseq import checkpoint_utils
|
357 |
import_fairseq()
|
358 |
models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
|
359 |
["hubert_base.pt"],
|
|
|
366 |
else:
|
367 |
hubert_model = hubert_model.float()
|
368 |
hubert_model.eval()
|
369 |
+
print(hubert_model)
|
370 |
return hubert_model
|
371 |
|
372 |
hubert_model = load_hubert()
|