Chlvnrz commited on
Commit
f290e20
·
verified ·
1 Parent(s): 99e2f8b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +13 -1
main.py CHANGED
@@ -35,7 +35,7 @@ def run():
35
  )
36
  with gr.Row():
37
  btn_from_scratch = gr.Button("Start")
38
- btn_continue = gr.Button("Continue Generation")
39
  btn_remove_last = gr.Button("Remove last instrument")
40
  btn_regenerate_last = gr.Button("Regenerate last instrument")
41
  with gr.Column():
@@ -57,6 +57,18 @@ def run():
57
  empty_sequence = gr.Text(visible=False)
58
  with gr.Row():
59
  num_tokens = gr.Text(visible=False)
 
 
 
 
 
 
 
 
 
 
 
 
60
  btn_continue.click(
61
  fn=generate_song,
62
  inputs=[genre, temp, text_sequence, qpm],
 
35
  )
36
  with gr.Row():
37
  btn_from_scratch = gr.Button("Start")
38
+ btn_continue = gr.Button("Generate Again")
39
  btn_remove_last = gr.Button("Remove last instrument")
40
  btn_regenerate_last = gr.Button("Regenerate last instrument")
41
  with gr.Column():
 
57
  empty_sequence = gr.Text(visible=False)
58
  with gr.Row():
59
  num_tokens = gr.Text(visible=False)
60
+ btn_from_scratch.click(
61
+ fn=generate_song,
62
+ inputs=[genre, temp, empty_sequence, qpm],
63
+ outputs=[
64
+ audio_output,
65
+ midi_file,
66
+ plot_output,
67
+ instruments_output,
68
+ text_sequence,
69
+ num_tokens,
70
+ ],
71
+ )
72
  btn_continue.click(
73
  fn=generate_song,
74
  inputs=[genre, temp, text_sequence, qpm],