asigalov61 commited on
Commit
91ccdd9
·
verified ·
1 Parent(s): 1dc1cfe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -365,7 +365,7 @@ def generate_callback_wrapper(input_midi,
365
  print('Req execution time:', (reqtime.time() - start_time), 'sec')
366
  print('*' * 70)
367
 
368
- return tuple([result[1], generated_batches, result[3]] + [item for sublist in result[0] for item in sublist[:-1]])
369
 
370
  #==================================================================================
371
 
@@ -442,7 +442,7 @@ def remove_batch(batch_number, num_tokens, final_composition, generated_batches,
442
 
443
  #==================================================================================
444
 
445
- def reset(final_composition=[], generated_batches=[], block_lines=[], model_state = []):
446
 
447
  final_composition = []
448
  generated_batches = []
@@ -453,7 +453,7 @@ def reset(final_composition=[], generated_batches=[], block_lines=[], model_stat
453
 
454
  #==================================================================================
455
 
456
- def reset_demo(final_composition=[], generated_batches=[], block_lines=[]):
457
 
458
  final_composition = []
459
  generated_batches = []
@@ -533,6 +533,8 @@ with gr.Blocks() as demo:
533
 
534
  outputs.extend([audio_output, plot_output])
535
 
 
 
536
  generate_btn.click(generate_callback_wrapper,
537
  [input_midi,
538
  num_prime_tokens,
 
365
  print('Req execution time:', (reqtime.time() - start_time), 'sec')
366
  print('*' * 70)
367
 
368
+ return tuple([result[1], generated_batches, result[3]] + [item for sublist in result[0] for item in sublist[:-1]] + [model_state])
369
 
370
  #==================================================================================
371
 
 
442
 
443
  #==================================================================================
444
 
445
+ def reset(final_composition=[], generated_batches=[], block_lines=[], model_state=[]):
446
 
447
  final_composition = []
448
  generated_batches = []
 
453
 
454
  #==================================================================================
455
 
456
+ def reset_demo(final_composition=[], generated_batches=[], block_lines=[], model_state=[]):
457
 
458
  final_composition = []
459
  generated_batches = []
 
533
 
534
  outputs.extend([audio_output, plot_output])
535
 
536
+ outputs.extend([[]])
537
+
538
  generate_btn.click(generate_callback_wrapper,
539
  [input_midi,
540
  num_prime_tokens,