Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -15,12 +15,12 @@ def predict(prompt):
|
|
15 |
wav = wav_bytes_from_spectrogram_image(spec)
|
16 |
with open("output.wav", "wb") as f:
|
17 |
f.write(wav[0].getbuffer())
|
18 |
-
return 'output.wav'
|
19 |
|
20 |
gr.Interface(
|
21 |
predict,
|
22 |
inputs="text",
|
23 |
-
outputs=[gr.Audio(type='filepath')],
|
24 |
title="Riffusion Text-to-Music",
|
25 |
description="Describe a musical prompt, generate music by getting a Riffusion spectrogram and its corresponding sound"
|
26 |
).queue(max_size=32, concurrency_count=20).launch(debug=True)
|
|
|
15 |
wav = wav_bytes_from_spectrogram_image(spec)
|
16 |
with open("output.wav", "wb") as f:
|
17 |
f.write(wav[0].getbuffer())
|
18 |
+
return spec, 'output.wav'
|
19 |
|
20 |
gr.Interface(
|
21 |
predict,
|
22 |
inputs="text",
|
23 |
+
outputs=[gr.Image(), gr.Audio(type='filepath')],
|
24 |
title="Riffusion Text-to-Music",
|
25 |
description="Describe a musical prompt, generate music by getting a Riffusion spectrogram and its corresponding sound"
|
26 |
).queue(max_size=32, concurrency_count=20).launch(debug=True)
|