Spaces:
Running
Running
asigalov61
commited on
Commit
•
cf3ba84
1
Parent(s):
8ba6ef1
Update app.py
Browse files
app.py
CHANGED
@@ -367,7 +367,7 @@ def match_midi(midi, progress=gr.Progress()):
|
|
367 |
plt.xlabel("Time")
|
368 |
plt.ylabel("Pitch")
|
369 |
|
370 |
-
with open(f"
|
371 |
f.write(MIDI.score2midi([mid_seq_ticks, mid_seq]))
|
372 |
audio = synthesis(MIDI.score2opus([mid_seq_ticks, mid_seq]), soundfont_path)
|
373 |
yield txt_mdata, "MIDI-Match-Sample.mid", (44100, audio), plt
|
@@ -403,7 +403,7 @@ if __name__ == "__main__":
|
|
403 |
" for faster running and longer generation"
|
404 |
)
|
405 |
|
406 |
-
input_midi = gr.File(label="
|
407 |
|
408 |
gr.Markdown("# Match results")
|
409 |
|
|
|
367 |
plt.xlabel("Time")
|
368 |
plt.ylabel("Pitch")
|
369 |
|
370 |
+
with open(f"MIDI-Match-Sample.mid", 'wb') as f:
|
371 |
f.write(MIDI.score2midi([mid_seq_ticks, mid_seq]))
|
372 |
audio = synthesis(MIDI.score2opus([mid_seq_ticks, mid_seq]), soundfont_path)
|
373 |
yield txt_mdata, "MIDI-Match-Sample.mid", (44100, audio), plt
|
|
|
403 |
" for faster running and longer generation"
|
404 |
)
|
405 |
|
406 |
+
input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid"], type="binary")
|
407 |
|
408 |
gr.Markdown("# Match results")
|
409 |
|