Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,10 @@ import gradio as gr
|
|
| 5 |
from audiodiffusion import AudioDiffusion
|
| 6 |
|
| 7 |
|
| 8 |
-
def generate_spectrogram_audio_and_loop(model_id):
|
| 9 |
audio_diffusion = AudioDiffusion(model_id=model_id)
|
| 10 |
image, (sample_rate,
|
| 11 |
-
audio) = audio_diffusion.generate_spectrogram_and_audio_from_audio(raw_audio=
|
| 12 |
loop = AudioDiffusion.loop_it(audio, sample_rate)
|
| 13 |
if loop is None:
|
| 14 |
loop = audio
|
|
|
|
| 5 |
from audiodiffusion import AudioDiffusion
|
| 6 |
|
| 7 |
|
| 8 |
+
def generate_spectrogram_audio_and_loop(audio_file,model_id):
|
| 9 |
audio_diffusion = AudioDiffusion(model_id=model_id)
|
| 10 |
image, (sample_rate,
|
| 11 |
+
audio) = audio_diffusion.generate_spectrogram_and_audio_from_audio(raw_audio=audio_file, start_step=500)
|
| 12 |
loop = AudioDiffusion.loop_it(audio, sample_rate)
|
| 13 |
if loop is None:
|
| 14 |
loop = audio
|