Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,6 @@ from musicfm.model.musicfm_25hz import MusicFM25Hz
|
|
| 49 |
from postprocessing.functional import postprocess_functional_structure
|
| 50 |
from dataset.label2id import DATASET_ID_ALLOWED_LABEL_IDS, DATASET_LABEL_TO_DATASET_ID
|
| 51 |
from utils.fetch_pretrained import download_all
|
| 52 |
-
import spaces
|
| 53 |
|
| 54 |
# Constants
|
| 55 |
MUSICFM_HOME_PATH = os.path.join("ckpts", "MusicFM")
|
|
@@ -120,7 +119,6 @@ def initialize_models(model_name: str, checkpoint: str, config_path: str):
|
|
| 120 |
|
| 121 |
return hp
|
| 122 |
|
| 123 |
-
@spaces.GPU()
|
| 124 |
def process_audio(audio_path, win_size=420, hop_size=420, num_classes=128):
|
| 125 |
"""Process audio file and return structure analysis results"""
|
| 126 |
global muq_model, musicfm_model, msa_model, device
|
|
|
|
| 49 |
from postprocessing.functional import postprocess_functional_structure
|
| 50 |
from dataset.label2id import DATASET_ID_ALLOWED_LABEL_IDS, DATASET_LABEL_TO_DATASET_ID
|
| 51 |
from utils.fetch_pretrained import download_all
|
|
|
|
| 52 |
|
| 53 |
# Constants
|
| 54 |
MUSICFM_HOME_PATH = os.path.join("ckpts", "MusicFM")
|
|
|
|
| 119 |
|
| 120 |
return hp
|
| 121 |
|
|
|
|
| 122 |
def process_audio(audio_path, win_size=420, hop_size=420, num_classes=128):
|
| 123 |
"""Process audio file and return structure analysis results"""
|
| 124 |
global muq_model, musicfm_model, msa_model, device
|