xycold commited on
Commit
89a14c6
1 Parent(s): d9b2d85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -66,7 +66,7 @@ def generate_output(file, column1, column2, choice, bins):
66
  # 统计每个身高分段中不同心血管疾病类别的数量
67
  counts = pd.crosstab(data_x, data_y)
68
  # 设置画布大小
69
- plt.figure(figsize=(bins*2, 8))
70
  # 绘制分段柱形图
71
  counts.plot(kind='bar')
72
  # 设置 x 轴刻度标签横向显示
@@ -92,7 +92,7 @@ with gr.Blocks() as demo:
92
  choice_radio = gr.Radio(["是", "否"], label="特征列是否为连续值", visible=False) # , value="否"
93
  slider = gr.Slider(minimum=3, maximum=7, step=1, label="选择将特征列分组的分组数", visible=False, value=4)
94
  submit_button = gr.Button("查看结果", visible=False)
95
- with gr.Column():
96
  df_display = gr.Dataframe(visible=False)
97
  output_image = gr.Image(visible=False)
98
 
 
66
  # 统计每个身高分段中不同心血管疾病类别的数量
67
  counts = pd.crosstab(data_x, data_y)
68
  # 设置画布大小
69
+ plt.figure(figsize=(bins*2, 10))
70
  # 绘制分段柱形图
71
  counts.plot(kind='bar')
72
  # 设置 x 轴刻度标签横向显示
 
92
  choice_radio = gr.Radio(["是", "否"], label="特征列是否为连续值", visible=False) # , value="否"
93
  slider = gr.Slider(minimum=3, maximum=7, step=1, label="选择将特征列分组的分组数", visible=False, value=4)
94
  submit_button = gr.Button("查看结果", visible=False)
95
+ with gr.Column(cols=[1, 2]):
96
  df_display = gr.Dataframe(visible=False)
97
  output_image = gr.Image(visible=False)
98