LLH commited on
Commit
0903123
·
1 Parent(s): 4b04dd5

2024/03/09/18:30

Browse files
Files changed (1) hide show
  1. app.py +13 -23
app.py CHANGED
@@ -1235,12 +1235,16 @@ class Dataset:
1235
  for k in range(cumulative_sum, cumulative_sum + row_unit_num_list[j])]
1236
  )
1237
  return_list.extend(
1238
- [gr.Textbox("", visible=False)] * (EACH_ROW_NUM - 1 - row_unit_num_list[j])
1239
  )
1240
-
1241
  cumulative_sum += row_unit_num_list[j]
1242
 
1243
- return_list.extend(["", gr.Textbox(visible=False)] * (StaticValue.MAX_PARAMS_NUM - EACH_ROW_NUM * row_len))
 
 
 
 
1244
 
1245
  return return_list
1246
 
@@ -2441,26 +2445,12 @@ with gr.Blocks(js="./design/welcome.js", css="./design/custom.css") as demo:
2441
  outputs=get_outputs()
2442
  )
2443
 
2444
- # 数据模型
2445
- # !有BUG
2446
- if Dataset.choose_optimize and Dataset.choose_optimize != MN.none:
2447
- select_as_model_radio.change(
2448
- fn=select_as_model,
2449
- inputs=[select_as_model_radio],
2450
- outputs=get_outputs()
2451
- ).then(
2452
- fn=reset_select_model_optimize_radio_part_1,
2453
- outputs=get_outputs()
2454
- ).then(
2455
- fn=reset_select_model_optimize_radio_part_2,
2456
- outputs=get_outputs()
2457
- )
2458
- else:
2459
- select_as_model_radio.change(
2460
- fn=select_as_model,
2461
- inputs=[select_as_model_radio],
2462
- outputs=get_outputs()
2463
- )
2464
 
2465
  # [模型]
2466
  linear_regression_model_radio.change(
 
1235
  for k in range(cumulative_sum, cumulative_sum + row_unit_num_list[j])]
1236
  )
1237
  return_list.extend(
1238
+ [gr.Textbox(visible=False)] * (EACH_ROW_NUM - 1 - row_unit_num_list[j])
1239
  )
1240
+
1241
  cumulative_sum += row_unit_num_list[j]
1242
 
1243
+ print("row_len: {}".format(row_len))
1244
+ print(StaticValue.MAX_PARAMS_NUM - EACH_ROW_NUM * row_len)
1245
+ return_list.extend(
1246
+ [gr.Textbox(visible=False)] * (StaticValue.MAX_PARAMS_NUM - EACH_ROW_NUM * row_len)
1247
+ )
1248
 
1249
  return return_list
1250
 
 
2445
  outputs=get_outputs()
2446
  )
2447
 
2448
+ # 选择模型类型
2449
+ select_as_model_radio.change(
2450
+ fn=select_as_model,
2451
+ inputs=[select_as_model_radio],
2452
+ outputs=get_outputs()
2453
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2454
 
2455
  # [模型]
2456
  linear_regression_model_radio.change(