Skip to content

Commit 44ff1fe

Browse files
committed
UI: replace ugly ### markdown headers with styled section labels
- Remove all ### and ## markdown headers from training/inference tabs - Add _section() helper with clean purple accent bar labels - Replace bold markdown labels (f0_method, hubert_model) with styled labels - Remove redundant ## headers in parent tab wrappers - Training UI looks cleaner and more professional without bulky headers
1 parent 432b620 commit 44ff1fe

3 files changed

Lines changed: 22 additions & 15 deletions

File tree

arvc/app/tabs/inference/inference.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@
1313
def inference_tab():
1414
with gr.TabItem(translations["inference"], visible=configs.get("inference_tab", True)):
1515
with gr.TabItem(translations["convert_audio"], visible=configs.get("convert_tab", True)):
16-
gr.Markdown(f"## {translations['convert_audio']}")
1716
convert_tab()
1817
with gr.TabItem(translations["separator_tab"], visible=configs.get("separator_tab", True)):
19-
gr.Markdown(f"## {translations['separator_tab']}")
2018
separate_tab()
2119

2220
with gr.TabItem(translations["convert_with_whisper"], visible=configs.get("convert_with_whisper", True)):
23-
gr.Markdown(f"## {translations['convert_with_whisper']}")
2421
convert_with_whisper_tab()
2522

2623
with gr.TabItem(translations["convert_text"], visible=configs.get("tts_tab", True)):

arvc/app/tabs/training/child/training.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@
1010
from arvc.engine.models.optimizers import get_optimizer_choices, get_optimizer_info
1111
from arvc.engine.models.generators import get_vocoder_choices
1212

13+
# ── Styled section label (replaces ugly ### headers) ──────────────────────
14+
def _section(title):
15+
"""Render a clean section label with a subtle left accent bar."""
16+
return gr.HTML(
17+
f'<div style="display:flex;align-items:center;gap:8px;margin:4px 0 2px 0;">'
18+
f'<span style="width:3px;height:18px;border-radius:2px;background:linear-gradient(180deg,#6366f1,#8b5cf6);display:inline-block;"></span>'
19+
f'<span style="font-size:13px;font-weight:600;color:#c4b5fd;letter-spacing:0.3px;">{title}</span>'
20+
f'</div>'
21+
)
22+
23+
1324
def training_model_tab():
1425
with gr.Column():
1526
gr.Markdown(translations["training_markdown"])
@@ -101,7 +112,7 @@ def training_model_tab():
101112
with gr.Accordion("2. Feature Extraction", open=False):
102113
with gr.Row(equal_height=False):
103114
with gr.Column(scale=1):
104-
gr.Markdown(f"**{translations['f0_method']}**")
115+
_section(translations['f0_method'])
105116
onnx_f0_mode2 = gr.Checkbox(label=translations["f0_onnx_mode"], value=False, interactive=True)
106117
unlock_full_method4 = gr.Checkbox(label=translations["f0_unlock"], value=False, interactive=True)
107118
autotune = gr.Checkbox(label=translations["autotune"], value=False, interactive=True)
@@ -131,7 +142,7 @@ def training_model_tab():
131142
)
132143

133144
with gr.Column(scale=1):
134-
gr.Markdown(f"**{translations['hubert_model']}**")
145+
_section(translations['hubert_model'])
135146
embed_mode2 = gr.Radio(
136147
label=translations["embed_mode"], info=translations["embed_mode_info"],
137148
value="fairseq", choices=embedders_mode, interactive=True,
@@ -162,7 +173,7 @@ def training_model_tab():
162173
with gr.Accordion("4. Model Training", open=False):
163174
# ── Training Parameters ──
164175
with gr.Group():
165-
gr.Markdown("### Training Parameters")
176+
_section("Training Parameters")
166177
with gr.Row(equal_height=False):
167178
with gr.Column(scale=1):
168179
total_epochs = gr.Slider(
@@ -197,16 +208,16 @@ def training_model_tab():
197208

198209
# ── PyTorch Weight Format ──
199210
with gr.Group():
200-
gr.Markdown("### PyTorch Weight Format")
211+
_section("PyTorch Weight Format")
201212
newpytorch = gr.Checkbox(
202213
label="New PyTorch 2.0+ Format",
203-
info="Enable PyTorch 2.0+ parametrization format. Default: OFF = Old format (.weight_g/.weight_v) for broad RVC fork compatibility.",
214+
info="Default: OFF = Old format (.weight_g/.weight_v) for broad RVC fork compatibility. Turn ON for PyTorch 2.0+ parametrization format.",
204215
value=False, interactive=True,
205216
)
206217

207218
# ── Training Options ──
208219
with gr.Group():
209-
gr.Markdown("### Training Options")
220+
_section("Training Options")
210221
with gr.Row():
211222
cache_in_gpu = gr.Checkbox(label=translations["cache_in_gpu"], info=translations["cache_in_gpu_info"], value=True, interactive=True)
212223
overtraining_detector = gr.Checkbox(label=translations["overtraining_detector"], info=translations["overtraining_detector_info"], value=False, interactive=True)
@@ -218,15 +229,15 @@ def training_model_tab():
218229

219230
# ── Pretrain & Dataset ──
220231
with gr.Group():
221-
gr.Markdown("### Pretrain & Dataset")
232+
_section("Pretrain & Dataset")
222233
with gr.Row():
223234
not_use_pretrain = gr.Checkbox(label=translations["not_use_pretrain_2"], info=translations["not_use_pretrain_info"], value=False, interactive=True)
224235
custom_pretrain = gr.Checkbox(label=translations["custom_pretrain"], info=translations["custom_pretrain_info"], value=False, interactive=True)
225236
custom_dataset = gr.Checkbox(label=translations["custom_dataset"], info=translations["custom_dataset_info"], value=False, interactive=True)
226237

227238
# ── Advanced Settings ──
228239
with gr.Group():
229-
gr.Markdown("### Advanced Settings")
240+
_section("Advanced Settings")
230241
with gr.Row():
231242
multiscale_mel_loss = gr.Checkbox(label=translations["multiscale_mel_loss"], info=translations["multiscale_mel_loss_info"], value=False, interactive=True)
232243
cosine_lr = gr.Checkbox(label="Cosine Annealing LR", info="Use CosineAnnealingLR scheduler for better training quality (recommended)", value=True, interactive=True)
@@ -239,7 +250,7 @@ def training_model_tab():
239250
pretrain_setting = gr.Group(visible=False)
240251
with pretrain_setting:
241252
with gr.Accordion(translations["custom_pretrain_info"], open=True):
242-
gr.Markdown(f"**{translations.get('select_pretrain', 'Select from pretrained list')}**")
253+
_section(translations.get('select_pretrain', 'Select from pretrained list'))
243254
pretrained_data = fetch_pretrained_data()
244255
_pretrained_names = list(pretrained_data.keys()) if pretrained_data else []
245256
_first_model = _pretrained_names[0] if _pretrained_names else ''
@@ -256,7 +267,7 @@ def training_model_tab():
256267
value=_first_sr_choices[0] if _first_sr_choices else '',
257268
interactive=True,
258269
)
259-
gr.Markdown(f"**{translations.get('custom_pretrain_info', 'Or select files manually')}**")
270+
_section(translations.get('custom_pretrain_info', 'Or select files manually'))
260271
with gr.Row():
261272
pretrained_D = gr.Dropdown(
262273
label=translations["pretrain_file"].format(dg="D"),

arvc/app/tabs/training/training.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ def training_tab():
2020
create_reference_tab()
2121

2222
with gr.TabItem(translations["training_model"], visible=configs.get("training_tab", True)):
23-
gr.Markdown(f"## {translations['training_model']}")
24-
training_model_tab()
23+
training_model_tab()

0 commit comments

Comments
 (0)