Tuchuanhuhuhu commited on
Commit
6223547
1 Parent(s): 286541b

UI: 把 Panel 加回来并微调 UI

Browse files
Files changed (1) hide show
  1. ChuanhuChatbot.py +4 -4
ChuanhuChatbot.py CHANGED
@@ -188,18 +188,18 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
188
  downloadFile = gr.File(interactive=True)
189
 
190
  with gr.Tab(label=i18n("训练")):
191
- with gr.Column():
192
  dataset_preview_json = gr.JSON(label=i18n("数据集预览"), readonly=True)
193
  dataset_selection = gr.Files(label = i18n("选择数据集"), file_types=[".xlsx", ".jsonl"], file_count="single")
194
  upload_to_openai_btn = gr.Button(i18n("上传到OpenAI"), interactive=False)
195
 
196
- with gr.Column():
197
  openai_ft_file_id = gr.Textbox(label=i18n("文件ID"), value="", lines=1, placeholder=i18n("上传到 OpenAI 后自动填充"))
198
  openai_ft_suffix = gr.Textbox(label=i18n("模型名称后缀"), value="", lines=1, placeholder=i18n("可选,用于区分不同的模型"))
199
  openai_train_epoch_slider = gr.Slider(label=i18n("训练轮数"), minimum=1, maximum=100, value=3, step=1, interactive=True)
200
- openai_start_train_btn = gr.Button(i18n("开始训练"))
201
 
202
- with gr.Column():
203
  openai_train_status = gr.Markdown(label=i18n("训练状态"), value=i18n("未开始训练"))
204
  openai_status_refresh_btn = gr.Button(i18n("刷新状态"))
205
  openai_cancel_all_jobs_btn = gr.Button(i18n("取消所有任务"))
 
188
  downloadFile = gr.File(interactive=True)
189
 
190
  with gr.Tab(label=i18n("训练")):
191
+ with gr.Column(variant="panel"):
192
  dataset_preview_json = gr.JSON(label=i18n("数据集预览"), readonly=True)
193
  dataset_selection = gr.Files(label = i18n("选择数据集"), file_types=[".xlsx", ".jsonl"], file_count="single")
194
  upload_to_openai_btn = gr.Button(i18n("上传到OpenAI"), interactive=False)
195
 
196
+ with gr.Column(variant="panel"):
197
  openai_ft_file_id = gr.Textbox(label=i18n("文件ID"), value="", lines=1, placeholder=i18n("上传到 OpenAI 后自动填充"))
198
  openai_ft_suffix = gr.Textbox(label=i18n("模型名称后缀"), value="", lines=1, placeholder=i18n("可选,用于区分不同的模型"))
199
  openai_train_epoch_slider = gr.Slider(label=i18n("训练轮数"), minimum=1, maximum=100, value=3, step=1, interactive=True)
200
+ openai_start_train_btn = gr.Button(i18n("开始训练"), variant="primary")
201
 
202
+ with gr.Column(variant="panel"):
203
  openai_train_status = gr.Markdown(label=i18n("训练状态"), value=i18n("未开始训练"))
204
  openai_status_refresh_btn = gr.Button(i18n("刷新状态"))
205
  openai_cancel_all_jobs_btn = gr.Button(i18n("取消所有任务"))