Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
from diffusers import DiffusionPipeline
|
3 |
-
import scipy
|
4 |
|
5 |
model_id = "harmonai/maestro-150k"
|
6 |
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
7 |
pipeline = pipeline.to("cuda")
|
8 |
|
9 |
-
def denoise(
|
10 |
-
audios = pipeline(audio_length_in_s=
|
11 |
return audios
|
12 |
|
13 |
-
gr.Interface(fn=denoise, inputs="
|
|
|
1 |
import gradio as gr
|
2 |
from diffusers import DiffusionPipeline
|
|
|
3 |
|
4 |
model_id = "harmonai/maestro-150k"
|
5 |
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
6 |
pipeline = pipeline.to("cuda")
|
7 |
|
8 |
+
def denoise(length_sec):
|
9 |
+
audios = pipeline(audio_length_in_s=length_sec).audios
|
10 |
return audios
|
11 |
|
12 |
+
gr.Interface(fn=denoise, inputs=gr.Slider(1.0, 6.0, value=3.0, step=0.5, label="Audio length in seconds"), outputs="audio").launch()
|