Spaces:
Build error
Build error
Commit
·
c298807
1
Parent(s):
8bfcdbb
add two outputs
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def generate_waveform(description):
|
|
| 32 |
# return "Error: Failed to generate the waveform."
|
| 33 |
if os.path.exists(generated_file_path):
|
| 34 |
waveform_video = gr.make_waveform(audio=generated_file_path, bg_color="#000000", bars_color="#00FF00", bar_count=100, bar_width=1.5, animate=True)
|
| 35 |
-
return waveform_video
|
| 36 |
else:
|
| 37 |
return "Error: Failed to generate the waveform."
|
| 38 |
|
|
@@ -60,7 +60,7 @@ iface = gr.Interface(
|
|
| 60 |
fn=generate_waveform,
|
| 61 |
inputs=gr.Textbox(lines=2, placeholder="Enter a music description here..."),
|
| 62 |
# outputs=gr.Audio(label="Download the Music 🎼"),
|
| 63 |
-
outputs=gr.Video(label="Watch the Waveform 🎼"),
|
| 64 |
description=intro,
|
| 65 |
examples=[
|
| 66 |
["A modern synthesizer creating futuristic soundscapes."],
|
|
|
|
| 32 |
# return "Error: Failed to generate the waveform."
|
| 33 |
if os.path.exists(generated_file_path):
|
| 34 |
waveform_video = gr.make_waveform(audio=generated_file_path, bg_color="#000000", bars_color="#00FF00", bar_count=100, bar_width=1.5, animate=True)
|
| 35 |
+
return waveform_video, generated_file_path
|
| 36 |
else:
|
| 37 |
return "Error: Failed to generate the waveform."
|
| 38 |
|
|
|
|
| 60 |
fn=generate_waveform,
|
| 61 |
inputs=gr.Textbox(lines=2, placeholder="Enter a music description here..."),
|
| 62 |
# outputs=gr.Audio(label="Download the Music 🎼"),
|
| 63 |
+
outputs=[gr.Video(label="Watch the Waveform 🎼"), gr.Audio(label="Download the Music 🎶")],
|
| 64 |
description=intro,
|
| 65 |
examples=[
|
| 66 |
["A modern synthesizer creating futuristic soundscapes."],
|