Spaces:
Running
Running
Commit
·
a699258
1
Parent(s):
93f80eb
Update app.py
Browse files
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
|
| 27 |
gr.Markdown("ABC Model")
|
| 28 |
with gr.Row():
|
| 29 |
with gr.Column():
|
| 30 |
-
|
|
|
|
| 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
|
| 35 |
|
| 36 |
with gr.Column():
|
| 37 |
-
output_audio_abc = gr.Audio(label="
|
| 38 |
-
output_gallery_abc = gr.Gallery(label="Sheet
|
| 39 |
-
with gr.TabItem("
|
| 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="
|
| 51 |
-
output_gallery_midi = gr.Gallery(label="Sheet
|
| 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])
|