Update main.py
Browse files
main.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
import gc
|
|
@@ -11,7 +12,6 @@ from audiosr import build_model, super_resolution
|
|
| 11 |
from scipy import signal
|
| 12 |
import pyloudnorm as pyln
|
| 13 |
import tempfile
|
| 14 |
-
import spaces
|
| 15 |
|
| 16 |
|
| 17 |
class AudioUpscaler:
|
|
@@ -363,7 +363,6 @@ class AudioUpscaler:
|
|
| 363 |
return waveform
|
| 364 |
# return output_file
|
| 365 |
|
| 366 |
-
@spaces.GPU
|
| 367 |
def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
|
| 368 |
audiosr = build_model(model_name=model_name)
|
| 369 |
|
|
@@ -386,6 +385,7 @@ def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
|
|
| 386 |
|
| 387 |
return (48000, waveform)
|
| 388 |
|
|
|
|
| 389 |
def upscale_audio(
|
| 390 |
input_file,
|
| 391 |
output_folder,
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import gradio as gr
|
| 3 |
import torch
|
| 4 |
import gc
|
|
|
|
| 12 |
from scipy import signal
|
| 13 |
import pyloudnorm as pyln
|
| 14 |
import tempfile
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
class AudioUpscaler:
|
|
|
|
| 363 |
return waveform
|
| 364 |
# return output_file
|
| 365 |
|
|
|
|
| 366 |
def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
|
| 367 |
audiosr = build_model(model_name=model_name)
|
| 368 |
|
|
|
|
| 385 |
|
| 386 |
return (48000, waveform)
|
| 387 |
|
| 388 |
+
@spaces.GPU
|
| 389 |
def upscale_audio(
|
| 390 |
input_file,
|
| 391 |
output_folder,
|