Spaces:
Sleeping
Sleeping
Next
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,6 +38,7 @@ def process_midi(file):
|
|
| 38 |
return events
|
| 39 |
|
| 40 |
def play_midi(file):
|
|
|
|
| 41 |
events = process_midi(file)
|
| 42 |
script = f"""
|
| 43 |
<script>
|
|
@@ -63,6 +64,6 @@ with gr.Blocks() as demo:
|
|
| 63 |
play_button = gr.Button("Play MIDI")
|
| 64 |
output = gr.HTML(elem_id="midi_visualizer_container")
|
| 65 |
out = gr.Audio(label=" output")
|
| 66 |
-
play_button.click(
|
| 67 |
|
| 68 |
demo.launch()
|
|
|
|
| 38 |
return events
|
| 39 |
|
| 40 |
def play_midi(file):
|
| 41 |
+
load_javascript()
|
| 42 |
events = process_midi(file)
|
| 43 |
script = f"""
|
| 44 |
<script>
|
|
|
|
| 64 |
play_button = gr.Button("Play MIDI")
|
| 65 |
output = gr.HTML(elem_id="midi_visualizer_container")
|
| 66 |
out = gr.Audio(label=" output")
|
| 67 |
+
play_button.click(play_midi, inputs=midi_file, outputs=output,out)
|
| 68 |
|
| 69 |
demo.launch()
|