import gradio as gr from diffusers import DiffusionPipeline model_id = "harmonai/maestro-150k" pipeline = DiffusionPipeline.from_pretrained(model_id) pipeline = pipeline.to("cuda") def denoise(length_sec): audios = pipeline(audio_length_in_s=length_sec).audios return audios 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()