asigalov61 commited on
Commit
2154fa3
1 Parent(s): 56e508f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -341,7 +341,7 @@ def match_midi(midi, progress=gr.Progress()):
341
  txt_mdata = ''
342
 
343
  for m in mdata:
344
- txt_mdata += str(m[0]) + ':' + str(m[1])
345
  txt_mdata += chr(10)
346
 
347
  x = []
@@ -396,20 +396,20 @@ if __name__ == "__main__":
396
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Upload any MIDI file to find its closest match</h1>")
397
 
398
  gr.Markdown("![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.MIDI-Match&style=flat)\n\n"
399
- "MIDI Match\n\n"
400
- "Demo for [MIDI Match](https://github.com/asigalov61)\n\n"
401
  "[Open In Colab]"
402
- "(https://colab.research.google.com/github/asigalov61/MIDI-Match/blob/main/demo.ipynb)"
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
 
410
  output_audio = gr.Audio(label="Output MIDI match sample audio", format="mp3", elem_id="midi_audio")
411
  output_plot = gr.Plot(label="Output MIDI match sample plot")
412
- output_midi = gr.File(label="Output MIDI match sample file", file_types=[".mid"])
413
  output_midi_seq = gr.Textbox(label="Output MIDI match metadata")
414
 
415
  run_event = input_midi.upload(match_midi, [input_midi],
 
341
  txt_mdata = ''
342
 
343
  for m in mdata:
344
+ txt_mdata += str(m[0]) + ': ' + str(m[1])
345
  txt_mdata += chr(10)
346
 
347
  x = []
 
396
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Upload any MIDI file to find its closest match</h1>")
397
 
398
  gr.Markdown("![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.MIDI-Match&style=flat)\n\n"
399
+ "Los Angeles MIDI Dataset Search and Explore Demo\n\n"
400
+ "Please see [Los Angeles MIDI Dataset](https://github.com/asigalov61/Los-Angeles-MIDI-Dataset) for more information and features\n\n"
401
  "[Open In Colab]"
402
+ "(https://colab.research.google.com/github/asigalov61/Los-Angeles-MIDI-Dataset/blob/main/Los_Angeles_MIDI_Dataset_Search_and_Explore.ipynb)"
403
+ " for faster execution"
404
  )
405
 
406
+ input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"], type="binary")
407
 
408
  gr.Markdown("# Match results")
409
 
410
  output_audio = gr.Audio(label="Output MIDI match sample audio", format="mp3", elem_id="midi_audio")
411
  output_plot = gr.Plot(label="Output MIDI match sample plot")
412
+ output_midi = gr.File(label="Output MIDI match sample MIDI", file_types=[".mid"])
413
  output_midi_seq = gr.Textbox(label="Output MIDI match metadata")
414
 
415
  run_event = input_midi.upload(match_midi, [input_midi],