Chin-Yun Yu commited on
Commit
a089213
·
1 Parent(s): d78ba89

feat: reorganise layout

Browse files
Files changed (1) hide show
  1. app.py +63 -60
app.py CHANGED
@@ -580,21 +580,23 @@ with gr.Blocks() as demo:
580
  with gr.Row():
581
  with gr.Column():
582
  _ = gr.Markdown("## Control Parameters")
583
- dataset_dropdown = gr.Dropdown(
584
- [("Internal", "internal"), ("MedleyDB", "medleydb")],
585
- label="Prior Distribution (Dataset)",
586
- info="This parameter has no effect when using the ST-ITO and Regression methods.",
587
- value="internal",
588
- interactive=True,
589
- )
590
- embedding_dropdown = gr.Dropdown(
591
- [("AFx-Rep", "afx-rep"), ("MFCC", "mfcc"), ("MIR Features", "mir")],
592
- label="Embedding Model",
593
- info="This parameter has no effect when using the Mean and Regression methods.",
594
- value="afx-rep",
595
- interactive=True,
596
- )
597
- with gr.Column():
 
 
598
  remove_approx_checkbox = gr.Checkbox(
599
  label="Use Real-time Effects",
600
  info="Use real-time delay and reverb effects instead of approximated ones.",
@@ -610,51 +612,52 @@ with gr.Blocks() as demo:
610
 
611
  with gr.Column():
612
  _ = gr.Markdown("## Parameters for ST-ITO Method")
613
- optimisation_steps = gr.Slider(
614
- minimum=1,
615
- maximum=2000,
616
- value=100,
617
- step=1,
618
- label="Number of Optimisation Steps",
619
- interactive=True,
620
- )
621
- prior_weight = gr.Dropdown(
622
- [
623
- ("0", 0.0),
624
- ("0.001", 0.001),
625
- ("0.01", 0.01),
626
- ("0.1", 0.1),
627
- ("1", 1.0),
628
- ],
629
- info="Weight of the prior distribution in the loss function. A higher value means the model will try to stay closer to the prior distribution.",
630
- value=0.01,
631
- label="Prior Weight",
632
- interactive=True,
633
- )
634
- optimiser_dropdown = gr.Dropdown(
635
- [
636
- "Adadelta",
637
- "Adafactor",
638
- "Adagrad",
639
- "Adam",
640
- "AdamW",
641
- "Adamax",
642
- "RMSprop",
643
- "ASGD",
644
- "NAdam",
645
- "RAdam",
646
- "SGD",
647
- ],
648
- value="Adam",
649
- label="Optimiser",
650
- interactive=True,
651
- )
652
- lr_slider = gr.Dropdown(
653
- [("0.0001", 1e-4), ("0.001", 1e-3), ("0.01", 1e-2), ("0.1", 1e-1)],
654
- value=1e-2,
655
- label="Learning Rate",
656
- interactive=True,
657
- )
 
658
 
659
  _ = gr.Markdown("## Effect Parameters Visualisation")
660
  with gr.Row():
 
580
  with gr.Row():
581
  with gr.Column():
582
  _ = gr.Markdown("## Control Parameters")
583
+
584
+ with gr.Row():
585
+ dataset_dropdown = gr.Dropdown(
586
+ [("Internal", "internal"), ("MedleyDB", "medleydb")],
587
+ label="Prior Distribution (Dataset)",
588
+ info="This parameter has no effect when using the ST-ITO and Regression methods.",
589
+ value="internal",
590
+ interactive=True,
591
+ )
592
+ embedding_dropdown = gr.Dropdown(
593
+ [("AFx-Rep", "afx-rep"), ("MFCC", "mfcc"), ("MIR Features", "mir")],
594
+ label="Embedding Model",
595
+ info="This parameter has no effect when using the Mean and Regression methods.",
596
+ value="afx-rep",
597
+ interactive=True,
598
+ )
599
+ # with gr.Column():
600
  remove_approx_checkbox = gr.Checkbox(
601
  label="Use Real-time Effects",
602
  info="Use real-time delay and reverb effects instead of approximated ones.",
 
612
 
613
  with gr.Column():
614
  _ = gr.Markdown("## Parameters for ST-ITO Method")
615
+ with gr.Row():
616
+ optimisation_steps = gr.Slider(
617
+ minimum=1,
618
+ maximum=2000,
619
+ value=100,
620
+ step=1,
621
+ label="Number of Optimisation Steps",
622
+ interactive=True,
623
+ )
624
+ prior_weight = gr.Dropdown(
625
+ [
626
+ ("0", 0.0),
627
+ ("0.001", 0.001),
628
+ ("0.01", 0.01),
629
+ ("0.1", 0.1),
630
+ ("1", 1.0),
631
+ ],
632
+ info="Weight of the prior distribution in the loss function. A higher value means the model will try to stay closer to the prior distribution.",
633
+ value=0.01,
634
+ label="Prior Weight",
635
+ interactive=True,
636
+ )
637
+ optimiser_dropdown = gr.Dropdown(
638
+ [
639
+ "Adadelta",
640
+ "Adafactor",
641
+ "Adagrad",
642
+ "Adam",
643
+ "AdamW",
644
+ "Adamax",
645
+ "RMSprop",
646
+ "ASGD",
647
+ "NAdam",
648
+ "RAdam",
649
+ "SGD",
650
+ ],
651
+ value="Adam",
652
+ label="Optimiser",
653
+ interactive=True,
654
+ )
655
+ lr_slider = gr.Dropdown(
656
+ [("0.0001", 1e-4), ("0.001", 1e-3), ("0.01", 1e-2), ("0.1", 1e-1)],
657
+ value=1e-2,
658
+ label="Learning Rate",
659
+ interactive=True,
660
+ )
661
 
662
  _ = gr.Markdown("## Effect Parameters Visualisation")
663
  with gr.Row():