asigalov61 commited on
Commit
165385c
·
verified ·
1 Parent(s): 9242953

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -422,7 +422,7 @@ def CompareMIDIs(input_midi, input_num_of_notes, input_patch_number):
422
  print('-' * 70)
423
  print('Req execution time:', (reqtime.time() - start_time), 'sec')
424
 
425
- return output_midi_title, output_midi_summary, output_midi, output_audio, output_plot
426
 
427
  # =================================================================================================
428
 
@@ -467,21 +467,21 @@ if __name__ == "__main__":
467
 
468
  gr.Markdown("## Inpainting results")
469
 
470
- output_midi_title = gr.Textbox(label="Output MIDI title")
471
- output_midi_summary = gr.Textbox(label="Output MIDI summary")
472
- output_audio = gr.Audio(label="Output MIDI audio", format="wav", elem_id="midi_audio")
473
- output_plot = gr.Plot(label="Output MIDI score plot")
474
- output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
475
 
 
 
 
476
  run_event = run_btn.click(CompareMIDIs, [input_src_midi, input_trg_midi, input_sampling_resolution, input_sampling_overlap],
477
- [output_audio, output_plot])
478
 
479
  gr.Examples(
480
  [
481
- ["Honesty.kar", "Hotel California.mid", 128, 0]
482
  ],
483
  [input_src_midi, input_trg_midi, input_sampling_resolution, input_sampling_overlap],
484
- [output_audio, output_plot],
485
  CompareMIDIs,
486
  cache_examples=True,
487
  )
 
422
  print('-' * 70)
423
  print('Req execution time:', (reqtime.time() - start_time), 'sec')
424
 
425
+ return output_src_audio, output_src_plot, output_trg_audio, output_trg_plot
426
 
427
  # =================================================================================================
428
 
 
467
 
468
  gr.Markdown("## Inpainting results")
469
 
470
+ output_src_audio = gr.Audio(label="Source MIDI audio", format="mp3", elem_id="midi_audio")
471
+ output_src_plot = gr.Plot(label="Source MIDI plot")
 
 
 
472
 
473
+ output_trg_audio = gr.Audio(label="Target MIDI audio", format="mp3", elem_id="midi_audio")
474
+ output_trg_plot = gr.Plot(label="Target MIDI plot")
475
+
476
  run_event = run_btn.click(CompareMIDIs, [input_src_midi, input_trg_midi, input_sampling_resolution, input_sampling_overlap],
477
+ [output_src_audio, output_src_plot, output_trg_audio, output_trg_plot])
478
 
479
  gr.Examples(
480
  [
481
+ ["Honesty.kar", "Hotel California.mid", 200, 0]
482
  ],
483
  [input_src_midi, input_trg_midi, input_sampling_resolution, input_sampling_overlap],
484
+ [output_src_audio, output_src_plot, output_trg_audio, output_trg_plot],
485
  CompareMIDIs,
486
  cache_examples=True,
487
  )