mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2026-07-22 18:20:37 +08:00
style(webui): 布局对齐美观调整
1. html_center margin:100→8px 0 修复板块标题上下100px巨大空白, 改为紧凑8px, 整体视觉更聚合 (影响所有用 html_center 的板块标题: 模型切换/参考信息/目标文本等) 2. 模型切换板块两行 scale 统一总宽28: Row1: 模型名(20)+刷新模型列表(8) = 28 Row2: GPT(10)+SoVITS(10)+刷新模型路径(8) = 28 (原 Row1=21+7=28, Row2=14+14+14=42 不一致; 现两行等宽对齐) 验证: WebUI启动正常, margin:8px 0 生效, 端到端功能不受影响。
This commit is contained in:
parent
757994c4ba
commit
aac226ad49
@ -1194,7 +1194,7 @@ def process_text(texts):
|
||||
|
||||
|
||||
def html_center(text, label="p"):
|
||||
return f"""<div style="text-align: center; margin: 100; padding: 50;">
|
||||
return f"""<div style="text-align: center; margin: 8px 0; padding: 4px 0;">
|
||||
<{label} style="margin: 0; padding: 0;">{text}</{label}>
|
||||
</div>"""
|
||||
|
||||
@ -1453,25 +1453,25 @@ with gr.Blocks(title="GPT-SoVITS WebUI", analytics_enabled=False, js=js, css=css
|
||||
choices=[],
|
||||
value="",
|
||||
interactive=True,
|
||||
scale=21,
|
||||
scale=20,
|
||||
)
|
||||
refresh_models_btn = gr.Button(i18n("刷新模型列表"), variant="primary", scale=7)
|
||||
refresh_models_btn = gr.Button(i18n("刷新模型列表"), variant="primary", scale=8)
|
||||
with gr.Row():
|
||||
GPT_dropdown = gr.Dropdown(
|
||||
label=i18n("GPT模型列表"),
|
||||
choices=sorted(GPT_names, key=custom_sort_key),
|
||||
value=gpt_path,
|
||||
interactive=True,
|
||||
scale=14,
|
||||
scale=10,
|
||||
)
|
||||
SoVITS_dropdown = gr.Dropdown(
|
||||
label=i18n("SoVITS模型列表"),
|
||||
choices=sorted(SoVITS_names, key=custom_sort_key),
|
||||
value=sovits_path,
|
||||
interactive=True,
|
||||
scale=14,
|
||||
scale=10,
|
||||
)
|
||||
refresh_button = gr.Button(i18n("刷新模型路径"), variant="primary", scale=14)
|
||||
refresh_button = gr.Button(i18n("刷新模型路径"), variant="primary", scale=8)
|
||||
refresh_button.click(fn=change_choices, inputs=[], outputs=[SoVITS_dropdown, GPT_dropdown])
|
||||
with gr.Group():
|
||||
gr.Markdown(html_center(i18n("*请上传并填写参考信息"), "h3"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user