Spaces:
Sleeping
Sleeping
Commit
·
5f886ae
1
Parent(s):
83ca69a
imported spaces first
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import torch
|
| 2 |
import torchaudio
|
| 3 |
import gradio as gr
|
|
@@ -5,7 +6,7 @@ from demucs import pretrained
|
|
| 5 |
from demucs.apply import apply_model
|
| 6 |
from pyharp import *
|
| 7 |
from audiotools import AudioSignal
|
| 8 |
-
|
| 9 |
|
| 10 |
# Available Demucs models
|
| 11 |
DEMUX_MODELS = ["mdx_extra_q", "mdx_extra", "htdemucs", "mdx_q"]
|
|
@@ -17,7 +18,6 @@ STEM_CHOICES = {
|
|
| 17 |
"Other": 2,
|
| 18 |
"Instrumental (No Vocals)": "instrumental"
|
| 19 |
}
|
| 20 |
-
|
| 21 |
@spaces.GPU
|
| 22 |
def separate_stem(audio_file_path: str, model_name: str, stem_choice: str):
|
| 23 |
"""
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import torch
|
| 3 |
import torchaudio
|
| 4 |
import gradio as gr
|
|
|
|
| 6 |
from demucs.apply import apply_model
|
| 7 |
from pyharp import *
|
| 8 |
from audiotools import AudioSignal
|
| 9 |
+
|
| 10 |
|
| 11 |
# Available Demucs models
|
| 12 |
DEMUX_MODELS = ["mdx_extra_q", "mdx_extra", "htdemucs", "mdx_q"]
|
|
|
|
| 18 |
"Other": 2,
|
| 19 |
"Instrumental (No Vocals)": "instrumental"
|
| 20 |
}
|
|
|
|
| 21 |
@spaces.GPU
|
| 22 |
def separate_stem(audio_file_path: str, model_name: str, stem_choice: str):
|
| 23 |
"""
|