asigalov61 commited on
Commit
f67606f
·
verified ·
1 Parent(s): 7dacd91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -12
app.py CHANGED
@@ -260,18 +260,11 @@ def Classify_MIDI_Genre(input_midi):
260
  print('=' * 70)
261
  print('Requested settings:')
262
  print('=' * 70)
263
- if input_midi:
264
- fn = os.path.basename(input_midi)
265
- fn1 = fn.split('.')[0]
266
- print('Input MIDI file name:', fn)
267
 
268
- else:
269
- print('Input sample melody:', input_melody)
270
- print('Source melody patch:', melody_patch)
271
- print('Use nth melody note:', use_nth_note)
272
- print('Model temperature:', model_temperature)
273
- print('Model top k:', model_sampling_top_k)
274
-
275
  print('=' * 70)
276
 
277
  #===============================================================================
@@ -479,7 +472,21 @@ with gr.Blocks() as demo:
479
  output_midi
480
  ]
481
  )
482
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  #==================================================================================
484
 
485
  demo.launch()
 
260
  print('=' * 70)
261
  print('Requested settings:')
262
  print('=' * 70)
 
 
 
 
263
 
264
+ fn = os.path.basename(input_midi)
265
+ fn1 = fn.split('.')[0]
266
+
267
+ print('Input MIDI file name:', fn)
 
 
 
268
  print('=' * 70)
269
 
270
  #===============================================================================
 
472
  output_midi
473
  ]
474
  )
475
+
476
+ gr.Examples(
477
+ [["Hotel California.mid"],
478
+ ["Come To My Window.mid"]
479
+ ],
480
+ [input_midi
481
+ ],
482
+ [output_title,
483
+ output_audio,
484
+ output_plot,
485
+ output_midi
486
+ ],
487
+ Classify_MIDI_Genre
488
+ )
489
+
490
  #==================================================================================
491
 
492
  demo.launch()