asigalov61 commited on
Commit
87a12d2
·
verified ·
1 Parent(s): bde52ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -1,6 +1,6 @@
1
- #=======================================================================
2
  # https://huggingface.co/spaces/asigalov61/Score-2-Performance-Transformer
3
- #=======================================================================
4
 
5
  import os
6
  import time as reqtime
@@ -144,6 +144,8 @@ def load_midi(midi_file)
144
  print('=' * 70)
145
 
146
  return melody_chords_f, src_melody_chords_f
 
 
147
 
148
  @spaces.GPU
149
  def Convert_Score_to_Performance(input_midi,
@@ -555,11 +557,11 @@ if __name__ == "__main__":
555
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
556
 
557
  gr.Examples(
558
- [["Rock Violin.mid", "Controlled", 0, 512, True, True, 512, 1024, 2048, 0.9, 0.96],
559
- ["Come To My Window.mid", "Controlled", 128, 256, False, False, 512, 1024, 2048, 0.9, 0.96],
560
- ["Sharing The Night Together.kar", "Controlled", 128, 256, True, True, 512, 1024, 2048, 0.9, 0.96],
561
- ["Hotel California.mid", "Controlled", 128, 256, True, True, 512, 1024, 2048, 0.9, 0.96],
562
- ["Nothing Else Matters.kar", "Controlled", 128, 256, True, True, 512, 1024, 2048, 0.9, 0.96],
563
  ],
564
  [input_midi,
565
  input_gen_type,
@@ -576,7 +578,6 @@ if __name__ == "__main__":
576
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
577
  Generate_Rock_Song,
578
  cache_examples=True,
579
- cache_mode='eager'
580
  )
581
 
582
  app.queue().launch()
 
1
+ #=========================================================================
2
  # https://huggingface.co/spaces/asigalov61/Score-2-Performance-Transformer
3
+ #=========================================================================
4
 
5
  import os
6
  import time as reqtime
 
144
  print('=' * 70)
145
 
146
  return melody_chords_f, src_melody_chords_f
147
+
148
+ # =================================================================================================
149
 
150
  @spaces.GPU
151
  def Convert_Score_to_Performance(input_midi,
 
557
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
558
 
559
  gr.Examples(
560
+ [["asap_midi_score_21.mid", "Controlled", 0, 512, True, True, 512, 1024, 2048, 0.9, 0.96],
561
+ ["asap_midi_score_45.mid", "Controlled", 128, 256, False, False, 512, 1024, 2048, 0.9, 0.96],
562
+ ["asap_midi_score_69.mid", "Controlled", 128, 256, True, True, 512, 1024, 2048, 0.9, 0.96],
563
+ ["asap_midi_score_118.mid", "Controlled", 128, 256, True, True, 512, 1024, 2048, 0.9, 0.96],
564
+ ["asap_midi_score_167.mid", "Controlled", 128, 256, True, True, 512, 1024, 2048, 0.9, 0.96],
565
  ],
566
  [input_midi,
567
  input_gen_type,
 
578
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
579
  Generate_Rock_Song,
580
  cache_examples=True,
 
581
  )
582
 
583
  app.queue().launch()