asigalov61 commited on
Commit
0cbc894
1 Parent(s): 44d8f4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -314,7 +314,7 @@ def tokens_to_MIDI(tokens, MIDI_name):
314
 
315
  # =================================================================================================
316
 
317
- # @spaces.GPU
318
  def CompareMIDIs(input_src_midi, input_trg_midi, input_sampling_resolution, input_sampling_overlap):
319
 
320
  print('=' * 70)
@@ -325,7 +325,7 @@ def CompareMIDIs(input_src_midi, input_trg_midi, input_sampling_resolution, inpu
325
 
326
  SEQ_LEN = 8192 # Models seq len
327
  PAD_IDX = 19463 # Models pad index
328
- DEVICE = 'cpu' # 'cuda'
329
 
330
  # instantiate the model
331
 
@@ -524,7 +524,7 @@ if __name__ == "__main__":
524
 
525
  gr.Markdown("### Make sure that the MIDI has at least sampling resolution number of notes")
526
 
527
- input_sampling_resolution = gr.Slider(50, 2000, value=500, step=10, label="Sampling resolution in notes")
528
 
529
  gr.Markdown("### Make sure that the sampling overlap value is less than sampling resolution value")
530
 
 
314
 
315
  # =================================================================================================
316
 
317
+ @spaces.GPU
318
  def CompareMIDIs(input_src_midi, input_trg_midi, input_sampling_resolution, input_sampling_overlap):
319
 
320
  print('=' * 70)
 
325
 
326
  SEQ_LEN = 8192 # Models seq len
327
  PAD_IDX = 19463 # Models pad index
328
+ DEVICE = 'cuda' # 'cuda'
329
 
330
  # instantiate the model
331
 
 
524
 
525
  gr.Markdown("### Make sure that the MIDI has at least sampling resolution number of notes")
526
 
527
+ input_sampling_resolution = gr.Slider(50, 2000, value=50, step=10, label="Sampling resolution in notes")
528
 
529
  gr.Markdown("### Make sure that the sampling overlap value is less than sampling resolution value")
530