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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -12
app.py CHANGED
@@ -22,14 +22,9 @@ timesignature = ['3/4','4/4','2/2','2/4']
22
 
23
  with gr.Blocks() as demo:
24
 
25
- gr.Markdown("""
26
- ## Sight-reading generator for sheet music.
27
- Markov models which generate sheet music based on different input
28
- parameters given by the user.
29
- """)
30
  with gr.Tabs():
31
- with gr.TabItem("ABC Model"):
32
- gr.Markdown("N-grams model using ABC data as training data.")
33
  with gr.Row():
34
  with gr.Column():
35
  difficulty_input_abc = gr.Radio(difficulty,label="Difficulty") #input
@@ -39,10 +34,10 @@ with gr.Blocks() as demo:
39
  abc_button = gr.Button("Create Music!!") #Submit
40
 
41
  with gr.Column():
42
- output_gallery_abc = gr.Gallery(label="Sheet Music")
43
  output_audio_abc = gr.Audio(label="Audio")
44
- with gr.TabItem("MIDI Model"):
45
- gr.Markdown("Markov model using MIDI fata as training data.")
 
46
  with gr.Row():
47
  with gr.Column():
48
  # difficulty_input_midi = gr.Radio(difficulty,label="Difficulty") #input
@@ -52,9 +47,9 @@ with gr.Blocks() as demo:
52
  midi_button = gr.Button("Create Music!!") #Submit
53
 
54
  with gr.Column():
55
- output_gallery_midi = gr.Gallery(label="Sheet Music")
56
  output_audio_midi = gr.Audio(label="Audio")
57
-
 
58
  abc_button.click(music_gen, inputs=[difficulty_input_abc,time_sig_input_abc,key_sig_input_abc], outputs=[output_gallery_abc,output_audio_abc])
59
  midi_button.click(main_markov, inputs= time_sig_input_midi, outputs=[output_gallery_midi,output_audio_midi])
60
 
 
22
 
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
 
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():
43
  # difficulty_input_midi = gr.Radio(difficulty,label="Difficulty") #input
 
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])
55