asigalov61 commited on
Commit
0e99ce0
1 Parent(s): 6afdfd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -30
app.py CHANGED
@@ -363,17 +363,10 @@ if __name__ == "__main__":
363
 
364
  app = gr.Blocks()
365
  with app:
366
- gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Chords Progressions Transformer</h1>")
367
- gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Chords-conditioned music transformer</h1>")
368
  gr.Markdown(
369
- "![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.Chords-Progressions-Transformer&style=flat)\n\n"
370
- "Generate music based on chords progressions\n\n"
371
- "Check out [Chords Progressions Transformer](https://github.com/asigalov61/Chords-Progressions-Transformer) on GitHub!\n\n"
372
- "[Open In Colab]"
373
- "(https://colab.research.google.com/github/asigalov61/Chords-Progressions-Transformer/blob/main/Chords_Progressions_Transformer.ipynb)"
374
- " for faster execution and endless generation"
375
- )
376
- gr.Markdown("## Upload your MIDI or select a sample example MIDI")
377
 
378
  input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
379
  input_num_tokens = gr.Slider(4, 128, value=32, step=1, label="Number of composition chords to generate progression for")
@@ -394,24 +387,4 @@ if __name__ == "__main__":
394
  run_event = run_btn.click(GenerateAccompaniment, [input_midi, input_num_tokens, input_conditioning_type, input_strip_notes],
395
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
396
 
397
- gr.Examples(
398
- [["Chords-Progressions-Transformer-Piano-Seed-1.mid", 128, "Chords", False],
399
- ["Chords-Progressions-Transformer-Piano-Seed-2.mid", 128, "Chords-Times", False],
400
- ["Chords-Progressions-Transformer-Piano-Seed-3.mid", 128, "Chords-Times-Durations", False],
401
- ["Chords-Progressions-Transformer-Piano-Seed-4.mid", 128, "Chords", False],
402
- ["Chords-Progressions-Transformer-Piano-Seed-5.mid", 128, "Chords-Times", False],
403
- ["Chords-Progressions-Transformer-Piano-Seed-6.mid", 128, "Chords-Times-Durations", False],
404
- ["Chords-Progressions-Transformer-MI-Seed-1.mid", 128, "Chords", False],
405
- ["Chords-Progressions-Transformer-MI-Seed-2.mid", 128, "Chords-Times", False],
406
- ["Chords-Progressions-Transformer-MI-Seed-3.mid", 128, "Chords-Times-Durations", False],
407
- ["Chords-Progressions-Transformer-MI-Seed-4.mid", 128, "Chords-Times", False],
408
- ["Chords-Progressions-Transformer-MI-Seed-5.mid", 128, "Chords", False],
409
- ["Chords-Progressions-Transformer-MI-Seed-6.mid", 128, "Chords-Times-Durations", False]
410
- ],
411
- [input_midi, input_num_tokens, input_conditioning_type, input_strip_notes],
412
- [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
413
- GenerateAccompaniment,
414
- cache_examples=True,
415
- )
416
-
417
  app.queue().launch()
 
363
 
364
  app = gr.Blocks()
365
  with app:
366
+ gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Melody2Song Seq2Seq Music Transformer</h1>")
367
+ gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Generate unique songs from melodies with se2seq music transformer</h1>")
368
  gr.Markdown(
369
+ "![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.Melody2Song-Seq2Seq-Music-Transformer&style=flat)\n\n")
 
 
 
 
 
 
 
370
 
371
  input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
372
  input_num_tokens = gr.Slider(4, 128, value=32, step=1, label="Number of composition chords to generate progression for")
 
387
  run_event = run_btn.click(GenerateAccompaniment, [input_midi, input_num_tokens, input_conditioning_type, input_strip_notes],
388
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  app.queue().launch()