Update app.py
Browse files
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 |
-
[["
|
559 |
-
["
|
560 |
-
["
|
561 |
-
["
|
562 |
-
["
|
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()
|