doctorvivin commited on
Commit
a699258
1 Parent(s): 93f80eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -23,20 +23,21 @@ timesignature = ['3/4','4/4','2/2','2/4']
23
  with gr.Blocks() as demo:
24
 
25
  with gr.Tabs():
26
- with gr.TabItem("Advanced Model"):
27
  gr.Markdown("ABC Model")
28
  with gr.Row():
29
  with gr.Column():
30
- difficulty_input_abc = gr.Radio(difficulty,label="Difficulty") #input
 
31
  time_sig_input_abc = gr.Radio(timesignature,label="Time Signature") #input
32
  key_sig_input_abc = gr.Dropdown(keysignature,label="Key Signature") #input
33
  with gr.Row():
34
- abc_button = gr.Button("Create Music!!") #Submit
35
 
36
  with gr.Column():
37
- output_audio_abc = gr.Audio(label="Audio")
38
- output_gallery_abc = gr.Gallery(label="Sheet Music")
39
- with gr.TabItem("Simple Model"):
40
  gr.Markdown("MIDI Model")
41
  with gr.Row():
42
  with gr.Column():
@@ -47,8 +48,8 @@ with gr.Blocks() as demo:
47
  midi_button = gr.Button("Create Music!!") #Submit
48
 
49
  with gr.Column():
50
- output_audio_midi = gr.Audio(label="Audio")
51
- output_gallery_midi = gr.Gallery(label="Sheet Music")
52
 
53
  abc_button.click(music_gen, inputs=[difficulty_input_abc,time_sig_input_abc,key_sig_input_abc], outputs=[output_gallery_abc,output_audio_abc])
54
  midi_button.click(main_markov, inputs= time_sig_input_midi, outputs=[output_gallery_midi,output_audio_midi])
 
23
  with gr.Blocks() as demo:
24
 
25
  with gr.Tabs():
26
+ with gr.TabItem("MusicGen™ Advanced (v2)"):
27
  gr.Markdown("ABC Model")
28
  with gr.Row():
29
  with gr.Column():
30
+ user_name_input = gr.Textbox(placeholder="Only Melody supported for now!!!", label="Describe the music you want to create...")
31
+ difficulty_input_abc = gr.Radio(difficulty,label="Music Complexity") #input
32
  time_sig_input_abc = gr.Radio(timesignature,label="Time Signature") #input
33
  key_sig_input_abc = gr.Dropdown(keysignature,label="Key Signature") #input
34
  with gr.Row():
35
+ abc_button = gr.Button("Create AI Music with SpriFi MusicGen™!!") #Submit
36
 
37
  with gr.Column():
38
+ output_audio_abc = gr.Audio(label="Generated music")
39
+ output_gallery_abc = gr.Gallery(label="Music Note Sheet")
40
+ with gr.TabItem("MusicGen™ (v1)"):
41
  gr.Markdown("MIDI Model")
42
  with gr.Row():
43
  with gr.Column():
 
48
  midi_button = gr.Button("Create Music!!") #Submit
49
 
50
  with gr.Column():
51
+ output_audio_midi = gr.Audio(label="Generated music")
52
+ output_gallery_midi = gr.Gallery(label="Music Note Sheet")
53
 
54
  abc_button.click(music_gen, inputs=[difficulty_input_abc,time_sig_input_abc,key_sig_input_abc], outputs=[output_gallery_abc,output_audio_abc])
55
  midi_button.click(main_markov, inputs= time_sig_input_midi, outputs=[output_gallery_midi,output_audio_midi])