asigalov61 commited on
Commit
22def4c
1 Parent(s): e113c67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -11
app.py CHANGED
@@ -280,25 +280,24 @@ if __name__ == "__main__":
280
 
281
  soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
282
 
283
- print('Loading Monster Harmonized Melodies MIDI Dataset...')
284
  print('=' * 70)
285
  all_chords_toks_chunks, all_chords_ptcs_chunks = TMIDIX.Tegridy_Any_Pickle_File_Reader('Melody_Harmonizer_Transformer_Pitches_Chords_Pairs_Data')
286
 
287
  print('=' * 70)
288
- print('Total number of harmonized melodies:', len(all_chords_toks_chunks))
289
  print('=' * 70)
290
- print('Loading melodies...')
291
 
292
  src_chunks = np.array(all_chords_toks_chunks)
293
 
294
  print('Done!')
295
  print('=' * 70)
296
- print('Total loaded melodies count:', len(all_chords_toks_chunks))
297
- print('=' * 70)
298
-
299
  #===============================================================================
300
 
301
  app = gr.Blocks()
 
302
  with app:
303
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Melody Harmonizer Transformer</h1>")
304
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Harmonize any MIDI melody with transformers</h1>")
@@ -321,11 +320,7 @@ if __name__ == "__main__":
321
  melody_MIDI_patch_number = gr.Slider(0, 127, value=40, step=1, label="Source melody MIDI patch number")
322
  harmonized_accompaniment_MIDI_patch_number = gr.Slider(0, 127, value=0, step=1, label="Harmonized accompaniment MIDI patch number")
323
  base_MIDI_patch_number = gr.Slider(-1, 127, value=35, step=1, label="Base MIDI patch number")
324
-
325
- gr.Markdown("## PLEASE NOTE:")
326
- gr.Markdown("### 1) Harmonization may take a long time which is dependent on the melody length and selected harmonization settings")
327
- gr.Markdown("### 2) If harmonization fails, reduce harmonized melody chunk size value in settings above")
328
-
329
  run_btn = gr.Button("Harmonize Melody", variant="primary")
330
 
331
  gr.Markdown("## Harmonization results")
 
280
 
281
  soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
282
 
283
+ print('Loading Melody Harmonizer Transformer Pitches Chords Pairs Data...')
284
  print('=' * 70)
285
  all_chords_toks_chunks, all_chords_ptcs_chunks = TMIDIX.Tegridy_Any_Pickle_File_Reader('Melody_Harmonizer_Transformer_Pitches_Chords_Pairs_Data')
286
 
287
  print('=' * 70)
288
+ print('Total number of pitches chords pairs:', len(all_chords_toks_chunks))
289
  print('=' * 70)
290
+ print('Loading pitches chords pairs...')
291
 
292
  src_chunks = np.array(all_chords_toks_chunks)
293
 
294
  print('Done!')
295
  print('=' * 70)
296
+
 
 
297
  #===============================================================================
298
 
299
  app = gr.Blocks()
300
+
301
  with app:
302
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Melody Harmonizer Transformer</h1>")
303
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Harmonize any MIDI melody with transformers</h1>")
 
320
  melody_MIDI_patch_number = gr.Slider(0, 127, value=40, step=1, label="Source melody MIDI patch number")
321
  harmonized_accompaniment_MIDI_patch_number = gr.Slider(0, 127, value=0, step=1, label="Harmonized accompaniment MIDI patch number")
322
  base_MIDI_patch_number = gr.Slider(-1, 127, value=35, step=1, label="Base MIDI patch number")
323
+
 
 
 
 
324
  run_btn = gr.Button("Harmonize Melody", variant="primary")
325
 
326
  gr.Markdown("## Harmonization results")