Tuchuanhuhuhu commited on
Commit
6a49812
·
1 Parent(s): 4b3a2fb

UI: 加入训练 UI

Browse files
Files changed (2) hide show
  1. .gitignore +3 -2
  2. ChuanhuChatbot.py +12 -0
.gitignore CHANGED
@@ -140,7 +140,8 @@ dmypy.json
140
  api_key.txt
141
  config.json
142
  auth.json
143
- .models/
144
  lora/
145
  .idea
146
- templates/*
 
 
140
  api_key.txt
141
  config.json
142
  auth.json
143
+ models/
144
  lora/
145
  .idea
146
+ templates/*
147
+ files/
ChuanhuChatbot.py CHANGED
@@ -185,6 +185,18 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
185
  with gr.Column():
186
  downloadFile = gr.File(interactive=True)
187
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  with gr.Tab(label=i18n("高级")):
189
  gr.HTML(get_html("appearance_switcher.html").format(label=i18n("切换亮暗色主题")), elem_classes="insert-block")
190
  use_streaming_checkbox = gr.Checkbox(
 
185
  with gr.Column():
186
  downloadFile = gr.File(interactive=True)
187
 
188
+ with gr.Tab(label=i18n("训练")):
189
+ with gr.Column(variant="panel"):
190
+ dataset_preview_json = gr.JSON(label=i18n("数据集预览"), readonly=True)
191
+ upload_dataset_btn = gr.UploadButton(label = i18n("上传数据集"), file_types=[".xlsx", ".jsonl"])
192
+ with gr.Column(variant="panel"):
193
+ openai_train_epoch_slider = gr.Slider(label=i18n("训练轮数"), minimum=1, maximum=100, value=3, step=1, interactive=True)
194
+ openai_start_train_btn = gr.Button(i18n("开始训练"))
195
+ with gr.Column(variant="panel"):
196
+ openai_train_status = gr.Markdown(label=i18n("训练状态"), value=i18n("未开始训练"))
197
+ openai_status_refresh_btn = gr.Button(i18n("刷新状态"))
198
+ add_to_models_btn = gr.Button(i18n("添加到模型列表"), interactive=False)
199
+
200
  with gr.Tab(label=i18n("高级")):
201
  gr.HTML(get_html("appearance_switcher.html").format(label=i18n("切换亮暗色主题")), elem_classes="insert-block")
202
  use_streaming_checkbox = gr.Checkbox(