asigalov61 commited on
Commit
eed841c
1 Parent(s): 7277e13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -26
app.py CHANGED
@@ -403,23 +403,21 @@ if __name__ == "__main__":
403
 
404
  app = gr.Blocks()
405
  with app:
406
- gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Inpaint Music Transformer</h1>")
407
- gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Inpaint pitches in any MIDI</h1>")
408
  gr.Markdown(
409
- "![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.Inpaint-Music-Transformer&style=flat)\n\n"
410
- "This is a demo of the Giant Music Transformer pitches inpainting feature\n\n"
411
- "Check out [Giant Music Transformer](https://github.com/asigalov61/Giant-Music-Transformer) on GitHub!\n\n"
412
  "[Open In Colab]"
413
- "(https://colab.research.google.com/github/asigalov61/Giant-Music-Transformer/blob/main/Giant_Music_Transformer.ipynb)"
414
- " for all features, faster execution and endless generation"
415
  )
416
- gr.Markdown("## Upload your MIDI or select a sample example MIDI")
417
 
418
- input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
419
- input_num_of_notes = gr.Slider(8, 2048, value=128, step=8, label="Number of composition notes to inpaint")
420
- input_patch_number = gr.Slider(0, 127, value=0, step=1, label="Composition MIDI patch to inpaint")
421
 
422
- run_btn = gr.Button("generate", variant="primary")
423
 
424
  gr.Markdown("## Generation results")
425
 
@@ -434,22 +432,11 @@ if __name__ == "__main__":
434
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
435
 
436
  gr.Examples(
437
- [["Giant-Music-Transformer-Piano-Seed-1.mid", 128, 0],
438
- ["Giant-Music-Transformer-Piano-Seed-2.mid", 128, 0],
439
- ["Giant-Music-Transformer-Piano-Seed-3.mid", 128, 0],
440
- ["Giant-Music-Transformer-Piano-Seed-4.mid", 128, 0],
441
- ["Giant-Music-Transformer-Piano-Seed-5.mid", 128, 0],
442
- ["Giant-Music-Transformer-Piano-Seed-6.mid", 128, 0],
443
- ["Giant-Music-Transformer-MI-Seed-1.mid", 128, 71],
444
- ["Giant-Music-Transformer-MI-Seed-2.mid", 128, 40],
445
- ["Giant-Music-Transformer-MI-Seed-3.mid", 128, 40],
446
- ["Giant-Music-Transformer-MI-Seed-4.mid", 128, 40],
447
- ["Giant-Music-Transformer-MI-Seed-5.mid", 128, 40],
448
- ["Giant-Music-Transformer-MI-Seed-6.mid", 128, 0]
449
  ],
450
- [input_midi, input_num_of_notes, input_patch_number],
451
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
452
- InpaintPitches,
453
  cache_examples=True,
454
  )
455
 
 
403
 
404
  app = gr.Blocks()
405
  with app:
406
+ gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>ByteDance Solo Piano Audio to MIDI Transcription</h1>")
407
+ gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Transcribe any Solo Piano WAV or MP3 audio to MIDI</h1>")
408
  gr.Markdown(
409
+ "![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.ByteDance-Solo-Piano-Adio-to-MIDI-Transcription&style=flat)\n\n"
410
+ "This is a ByteDance Solo Piano Audio to MIDI Transcription Model\n\n"
411
+ "Check out [ByteDance Solo Piano Audio to MIDI Transcription](https://github.com/asigalov61/piano_transcription_inference) on GitHub!\n\n"
412
  "[Open In Colab]"
413
+ "(https://colab.research.google.com/github/asigalov61/tegridy-tools/blob/main/tegridy-tools/notebooks/ByteDance_Piano_Transcription.ipynb)"
414
+ " for faster execution and endless transcription"
415
  )
416
+ gr.Markdown("## Upload your Solo Piano WAV or MP3 audio or select a sample example audio file")
417
 
418
+ input_midi = gr.File(label="Input Solo Piano WAV or MP3 Audio File", file_types=[".wav", ".mp3"])
 
 
419
 
420
+ run_btn = gr.Button("transcribe", variant="primary")
421
 
422
  gr.Markdown("## Generation results")
423
 
 
432
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
433
 
434
  gr.Examples(
435
+ [["cut_liszt.mp3"],
 
 
 
 
 
 
 
 
 
 
 
436
  ],
437
+ [input_audio],
438
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
439
+ TranscribePianoAudio,
440
  cache_examples=True,
441
  )
442