Spaces:
Running
Running
asigalov61
commited on
Commit
•
f222a78
1
Parent(s):
4301ec8
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ def find_midi(title, artist):
|
|
142 |
with open(f"MIDI-Match-Sample.mid", 'wb') as f:
|
143 |
f.write(MIDI.score2midi([1000, song_f]))
|
144 |
audio = synthesis(MIDI.score2opus([1000, song_f]), soundfont_path)
|
145 |
-
yield
|
146 |
|
147 |
#==========================================================================================================
|
148 |
|
@@ -186,9 +186,8 @@ if __name__ == "__main__":
|
|
186 |
output_audio = gr.Audio(label="Output MIDI match sample audio", format="mp3", elem_id="midi_audio")
|
187 |
output_plot = gr.Plot(label="Output MIDI match sample plot")
|
188 |
output_midi = gr.File(label="Output MIDI match sample MIDI", file_types=[".mid"])
|
189 |
-
output_midi_seq = gr.Textbox(label="Output MIDI match metadata")
|
190 |
|
191 |
run_event = submit.click(find_midi, [title, artist],
|
192 |
-
[
|
193 |
|
194 |
app.queue(1).launch(server_port=opt.port, share=opt.share, inbrowser=True)
|
|
|
142 |
with open(f"MIDI-Match-Sample.mid", 'wb') as f:
|
143 |
f.write(MIDI.score2midi([1000, song_f]))
|
144 |
audio = synthesis(MIDI.score2opus([1000, song_f]), soundfont_path)
|
145 |
+
yield "MIDI-Match-Sample.mid", (44100, audio), plt
|
146 |
|
147 |
#==========================================================================================================
|
148 |
|
|
|
186 |
output_audio = gr.Audio(label="Output MIDI match sample audio", format="mp3", elem_id="midi_audio")
|
187 |
output_plot = gr.Plot(label="Output MIDI match sample plot")
|
188 |
output_midi = gr.File(label="Output MIDI match sample MIDI", file_types=[".mid"])
|
|
|
189 |
|
190 |
run_event = submit.click(find_midi, [title, artist],
|
191 |
+
[output_midi, output_audio, output_plot])
|
192 |
|
193 |
app.queue(1).launch(server_port=opt.port, share=opt.share, inbrowser=True)
|