asigalov61 commited on
Commit
d0f533f
1 Parent(s): 2a2c4ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -159,12 +159,18 @@ if __name__ == "__main__":
159
  "(https://colab.research.google.com/github/asigalov61/Los-Angeles-MIDI-Dataset/blob/main/Los_Angeles_MIDI_Dataset_Search_and_Explore.ipynb)"
160
  " for all features\n\n"
161
  )
162
- gr.Markdown("# Upload your MIDI")
 
163
  input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"], type="binary")
164
- render_options = gr.Checkbox(["Render as-is", "Extract melody", "Transform"], value="Lyrics", label="MIDI render options")
 
 
 
 
 
165
  submit = gr.Button()
166
 
167
- gr.Markdown("# Render results")
168
 
169
  output_midi_md5 = gr.Textbox(label="Output MIDI md5 hash")
170
  output_midi_title = gr.Textbox(label="Output MIDI title")
@@ -173,6 +179,8 @@ if __name__ == "__main__":
173
  output_plot = gr.Plot(label="Output MIDI score plot")
174
  output_midi_lyric = gr.Textbox(label="Output Karaoke MIDI lyric")
175
  output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
 
 
176
 
177
  run_event = submit.click(render_midi, [input_midi, render_options],
178
  [output_midi_md5, output_midi_title, output_midi_lyric, output_midi_summary, output_midi, output_audio, output_plot])
 
159
  "(https://colab.research.google.com/github/asigalov61/Los-Angeles-MIDI-Dataset/blob/main/Los_Angeles_MIDI_Dataset_Search_and_Explore.ipynb)"
160
  " for all features\n\n"
161
  )
162
+ gr.Markdown("## Upload your MIDI")
163
+
164
  input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"], type="binary")
165
+
166
+ gr.Markdown("## Select desired render options")
167
+
168
+ render_as_is = gr.Checkbox(label="Render as-is")
169
+ extract_melody = gr.Checkbox(label="Extract melody")
170
+ transform = gr.Checkbox(label="Transform")
171
  submit = gr.Button()
172
 
173
+ gr.Markdown("## Render results")
174
 
175
  output_midi_md5 = gr.Textbox(label="Output MIDI md5 hash")
176
  output_midi_title = gr.Textbox(label="Output MIDI title")
 
179
  output_plot = gr.Plot(label="Output MIDI score plot")
180
  output_midi_lyric = gr.Textbox(label="Output Karaoke MIDI lyric")
181
  output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
182
+
183
+ render_options = [render_as_is, extract_melody, transform]
184
 
185
  run_event = submit.click(render_midi, [input_midi, render_options],
186
  [output_midi_md5, output_midi_title, output_midi_lyric, output_midi_summary, output_midi, output_audio, output_plot])