admin commited on
Commit
2176c40
·
1 Parent(s): 0855707
Files changed (1) hide show
  1. app.py +25 -26
app.py CHANGED
@@ -22,6 +22,7 @@ EN2ZH = {
22
  "Audio": "音频",
23
  "Download template": "下载模板",
24
  "Save template": "保存模板",
 
25
  "The emotion to which the current template belongs": "当前模板所属情感",
26
  "Generate": "生成",
27
  "Generate chords coming soon": "生成和声控制暂不可用",
@@ -221,11 +222,16 @@ if __name__ == "__main__":
221
  }
222
  ```"""
223
  )
224
- data_opt = gr.Dropdown(
225
- ["VGMIDI", "EMOPIA", "Rough4Q"],
226
- label=_L("Dataset"),
227
- value="Rough4Q",
228
- )
 
 
 
 
 
229
 
230
  with gr.Tab(_L("By template")):
231
  gr.Image(
@@ -253,10 +259,6 @@ if __name__ == "__main__":
253
  ),
254
  value=_L("High"),
255
  )
256
- chord_chk = gr.Checkbox(
257
- label=_L("Generate chords coming soon"),
258
- value=False,
259
- )
260
  gen1_btn = gr.Button(_L("Generate"))
261
 
262
  with gr.Tab(_L("By feature control")):
@@ -287,10 +289,6 @@ if __name__ == "__main__":
287
  value=0,
288
  label=_L("Volume in dB"),
289
  )
290
- chord2_chk = gr.Checkbox(
291
- label=_L("Generate chords coming soon"),
292
- value=False,
293
- )
294
  gen2_btn = gr.Button(_L("Generate"))
295
  with gr.Accordion(label=_L("Save template"), open=False):
296
  with gr.Row():
@@ -301,23 +299,13 @@ if __name__ == "__main__":
301
  "The emotion to which the current template belongs"
302
  ),
303
  )
304
- save_btn = gr.Button(_L("Submit"))
305
 
306
  with gr.Column(min_width=160):
307
  save_file = gr.File(label=_L("Download template"))
308
 
309
  with gr.Column():
310
  wav_audio = gr.Audio(label=_L("Audio"), type="filepath")
311
- with gr.Row():
312
- with gr.Column(min_width=160):
313
- mid_file = gr.File(label=_L("Download MIDI"))
314
- pdf_file = gr.File(label=_L("Download PDF score"))
315
-
316
- with gr.Column(min_width=160):
317
- xml_file = gr.File(label=_L("Download MusicXML"))
318
- mxl_file = gr.File(label=_L("Download MXL"))
319
-
320
- status_bar = gr.Textbox(label=_L("Status"), show_copy_button=True)
321
  with gr.Accordion(label=_L("Feedback"), open=False):
322
  fdb_radio = gr.Radio(
323
  ["Q1", "Q2", "Q3", "Q4"],
@@ -327,8 +315,19 @@ if __name__ == "__main__":
327
  )
328
  fdb_btn = gr.Button(_L("Submit"))
329
 
330
- abc_txt = gr.Textbox(label=_L("ABC notation"), show_copy_button=True)
331
- staff_img = gr.Image(label=_L("Staff"), type="filepath")
 
 
 
 
 
 
 
 
 
 
 
332
 
333
  # actions
334
  gen1_btn.click(
 
22
  "Audio": "音频",
23
  "Download template": "下载模板",
24
  "Save template": "保存模板",
25
+ "Save": "保存",
26
  "The emotion to which the current template belongs": "当前模板所属情感",
27
  "Generate": "生成",
28
  "Generate chords coming soon": "生成和声控制暂不可用",
 
222
  }
223
  ```"""
224
  )
225
+ with gr.Row():
226
+ data_opt = gr.Dropdown(
227
+ ["VGMIDI", "EMOPIA", "Rough4Q"],
228
+ label=_L("Dataset"),
229
+ value="Rough4Q",
230
+ )
231
+ chord_chk = gr.Checkbox(
232
+ label=_L("Generate chords coming soon"),
233
+ value=False,
234
+ )
235
 
236
  with gr.Tab(_L("By template")):
237
  gr.Image(
 
259
  ),
260
  value=_L("High"),
261
  )
 
 
 
 
262
  gen1_btn = gr.Button(_L("Generate"))
263
 
264
  with gr.Tab(_L("By feature control")):
 
289
  value=0,
290
  label=_L("Volume in dB"),
291
  )
 
 
 
 
292
  gen2_btn = gr.Button(_L("Generate"))
293
  with gr.Accordion(label=_L("Save template"), open=False):
294
  with gr.Row():
 
299
  "The emotion to which the current template belongs"
300
  ),
301
  )
302
+ save_btn = gr.Button(_L("Save"))
303
 
304
  with gr.Column(min_width=160):
305
  save_file = gr.File(label=_L("Download template"))
306
 
307
  with gr.Column():
308
  wav_audio = gr.Audio(label=_L("Audio"), type="filepath")
 
 
 
 
 
 
 
 
 
 
309
  with gr.Accordion(label=_L("Feedback"), open=False):
310
  fdb_radio = gr.Radio(
311
  ["Q1", "Q2", "Q3", "Q4"],
 
315
  )
316
  fdb_btn = gr.Button(_L("Submit"))
317
 
318
+ status_bar = gr.Textbox(label=_L("Status"), show_copy_button=True)
319
+ with gr.Row():
320
+ mid_file = gr.File(label=_L("Download MIDI"), min_width=40)
321
+ pdf_file = gr.File(label=_L("Download PDF score"), min_width=40)
322
+ xml_file = gr.File(label=_L("Download MusicXML"), min_width=40)
323
+ mxl_file = gr.File(label=_L("Download MXL"), min_width=40)
324
+
325
+ with gr.Row():
326
+ abc_txt = gr.TextArea(
327
+ label=_L("ABC notation"),
328
+ show_copy_button=True,
329
+ )
330
+ staff_img = gr.Image(label=_L("Staff"), type="filepath")
331
 
332
  # actions
333
  gen1_btn.click(