Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,6 @@ from ensemble import ensemble_files
|
|
| 15 |
import shutil
|
| 16 |
import gradio_client.utils as client_utils
|
| 17 |
import matchering as mg
|
| 18 |
-
import spaces
|
| 19 |
import gdown
|
| 20 |
from pydub import AudioSegment
|
| 21 |
import gc
|
|
@@ -372,7 +371,6 @@ def download_audio(url, cookie_file=None):
|
|
| 372 |
os.remove(temp_output_path)
|
| 373 |
logger.info(f"Temporary file deleted: {temp_output_path}")
|
| 374 |
|
| 375 |
-
@spaces.GPU
|
| 376 |
def roformer_separator(audio, model_key, seg_size, override_seg_size, overlap, pitch_shift, model_dir, output_dir, out_format, norm_thresh, amp_thresh, batch_size, exclude_stems="", progress=gr.Progress(track_tqdm=True)):
|
| 377 |
if not audio:
|
| 378 |
raise ValueError("No audio file provided.")
|
|
@@ -435,7 +433,6 @@ def roformer_separator(audio, model_key, seg_size, override_seg_size, overlap, p
|
|
| 435 |
torch.cuda.empty_cache()
|
| 436 |
logger.info("GPU memory cleared")
|
| 437 |
|
| 438 |
-
@spaces.GPU
|
| 439 |
def auto_ensemble_process(audio, model_keys, seg_size=64, overlap=0.1, out_format="wav", use_tta="False", model_dir="/tmp/audio-separator-models/", output_dir="output", norm_thresh=0.9, amp_thresh=0.9, batch_size=1, ensemble_method="avg_wave", exclude_stems="", weights_str="", progress=gr.Progress(track_tqdm=True)):
|
| 440 |
temp_audio_path = None
|
| 441 |
max_retries = 2
|
|
|
|
| 15 |
import shutil
|
| 16 |
import gradio_client.utils as client_utils
|
| 17 |
import matchering as mg
|
|
|
|
| 18 |
import gdown
|
| 19 |
from pydub import AudioSegment
|
| 20 |
import gc
|
|
|
|
| 371 |
os.remove(temp_output_path)
|
| 372 |
logger.info(f"Temporary file deleted: {temp_output_path}")
|
| 373 |
|
|
|
|
| 374 |
def roformer_separator(audio, model_key, seg_size, override_seg_size, overlap, pitch_shift, model_dir, output_dir, out_format, norm_thresh, amp_thresh, batch_size, exclude_stems="", progress=gr.Progress(track_tqdm=True)):
|
| 375 |
if not audio:
|
| 376 |
raise ValueError("No audio file provided.")
|
|
|
|
| 433 |
torch.cuda.empty_cache()
|
| 434 |
logger.info("GPU memory cleared")
|
| 435 |
|
|
|
|
| 436 |
def auto_ensemble_process(audio, model_keys, seg_size=64, overlap=0.1, out_format="wav", use_tta="False", model_dir="/tmp/audio-separator-models/", output_dir="output", norm_thresh=0.9, amp_thresh=0.9, batch_size=1, ensemble_method="avg_wave", exclude_stems="", weights_str="", progress=gr.Progress(track_tqdm=True)):
|
| 437 |
temp_audio_path = None
|
| 438 |
max_retries = 2
|