Spaces:
Running
Running
asigalov61
commited on
Commit
•
d34b744
1
Parent(s):
30ee3c5
Update app.py
Browse files
app.py
CHANGED
@@ -325,8 +325,10 @@ if __name__ == "__main__":
|
|
325 |
|
326 |
input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
|
327 |
input_find_best_match = gr.Checkbox(label="Find best match", value=True)
|
328 |
-
input_adjust_melody_notes_durations = gr.Checkbox(label="Adjust melody notes durations", value=
|
329 |
-
input_adjust_accompaniment_notes_durations = gr.Checkbox(label="Adjust accompaniment notes durations", value=
|
|
|
|
|
330 |
|
331 |
run_btn = gr.Button("mix melody", variant="primary")
|
332 |
|
@@ -334,19 +336,31 @@ if __name__ == "__main__":
|
|
334 |
|
335 |
output_midi_title = gr.Textbox(label="Output MIDI title")
|
336 |
output_midi_summary = gr.Textbox(label="Output MIDI summary")
|
337 |
-
output_audio = gr.Audio(label="Output MIDI audio", format="
|
338 |
output_plot = gr.Plot(label="Output MIDI score plot")
|
339 |
output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
|
340 |
|
341 |
|
342 |
-
run_event = run_btn.click(MixMelody, [input_midi,
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
|
344 |
|
345 |
gr.Examples(
|
346 |
-
[["Abracadabra-Sample-Melody.mid", True, True, True],
|
347 |
-
["Sparks-Fly-Sample-Melody.mid", True, True, True],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
],
|
349 |
-
[input_midi, input_find_best_match, input_adjust_melody_notes_durations, input_adjust_accompaniment_notes_durations],
|
350 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
|
351 |
MixMelody,
|
352 |
cache_examples=True,
|
|
|
325 |
|
326 |
input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
|
327 |
input_find_best_match = gr.Checkbox(label="Find best match", value=True)
|
328 |
+
input_adjust_melody_notes_durations = gr.Checkbox(label="Adjust melody notes durations", value=False)
|
329 |
+
input_adjust_accompaniment_notes_durations = gr.Checkbox(label="Adjust accompaniment notes durations", value=False)
|
330 |
+
input_output_as_solo_piano = gr.Checkbox(label="Output as Solo Piano", value=False)
|
331 |
+
input_remove_drums = gr.Checkbox(label="Remove drums from output", value=False)
|
332 |
|
333 |
run_btn = gr.Button("mix melody", variant="primary")
|
334 |
|
|
|
336 |
|
337 |
output_midi_title = gr.Textbox(label="Output MIDI title")
|
338 |
output_midi_summary = gr.Textbox(label="Output MIDI summary")
|
339 |
+
output_audio = gr.Audio(label="Output MIDI audio", format="mp3", elem_id="midi_audio")
|
340 |
output_plot = gr.Plot(label="Output MIDI score plot")
|
341 |
output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
|
342 |
|
343 |
|
344 |
+
run_event = run_btn.click(MixMelody, [input_midi,
|
345 |
+
input_find_best_match,
|
346 |
+
input_adjust_melody_notes_durations,
|
347 |
+
input_adjust_accompaniment_notes_durations,
|
348 |
+
input_output_as_solo_piano,
|
349 |
+
input_remove_drums
|
350 |
+
],
|
351 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
|
352 |
|
353 |
gr.Examples(
|
354 |
+
[["Abracadabra-Sample-Melody.mid", True, True, True, False],
|
355 |
+
["Sparks-Fly-Sample-Melody.mid", True, True, True, False],
|
356 |
+
],
|
357 |
+
[input_midi,
|
358 |
+
input_find_best_match,
|
359 |
+
input_adjust_melody_notes_durations,
|
360 |
+
input_adjust_accompaniment_notes_durations,
|
361 |
+
input_output_as_solo_piano,
|
362 |
+
input_remove_drums
|
363 |
],
|
|
|
364 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
|
365 |
MixMelody,
|
366 |
cache_examples=True,
|