Spaces:
Runtime error
Runtime error
Commit
·
b862b5e
1
Parent(s):
b28b689
add midi download button
Browse files
app.py
CHANGED
|
@@ -39,7 +39,7 @@ def inference(file_up, composer):
|
|
| 39 |
save_mix=True,
|
| 40 |
)
|
| 41 |
|
| 42 |
-
return mix_path
|
| 43 |
|
| 44 |
|
| 45 |
block = gr.Blocks()
|
|
@@ -73,9 +73,11 @@ with block:
|
|
| 73 |
file_up = gr.Audio(label="Upload an audio", type="filepath")
|
| 74 |
composer = gr.Dropdown(label="Arranger", choices=composers, value="composer1")
|
| 75 |
btn = gr.Button("Convert")
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
| 79 |
gr.HTML(
|
| 80 |
"""
|
| 81 |
<div class="footer">
|
|
|
|
| 39 |
save_mix=True,
|
| 40 |
)
|
| 41 |
|
| 42 |
+
return mix_path, midi_path
|
| 43 |
|
| 44 |
|
| 45 |
block = gr.Blocks()
|
|
|
|
| 73 |
file_up = gr.Audio(label="Upload an audio", type="filepath")
|
| 74 |
composer = gr.Dropdown(label="Arranger", choices=composers, value="composer1")
|
| 75 |
btn = gr.Button("Convert")
|
| 76 |
+
with gr.Box():
|
| 77 |
+
with gr.Row().style(mobile_collapse=False, equal_height=True):
|
| 78 |
+
out = gr.Audio(label="Output")
|
| 79 |
+
midi_out = gr.File(label="Download Midi")
|
| 80 |
+
btn.click(inference, inputs=[file_up, composer], outputs=[out, midi_out])
|
| 81 |
gr.HTML(
|
| 82 |
"""
|
| 83 |
<div class="footer">
|