Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,8 @@ plt.rcParams['axes.unicode_minus'] = False # 设置正常显示字符
|
|
13 |
def process_data(file_name, column1, column2, is_continuous, bins):
|
14 |
# column1 = "身高"
|
15 |
# column2 = "心血管疾病"
|
16 |
-
is_continuous = True
|
17 |
-
bins = 5
|
18 |
# 读取数据
|
19 |
df = pd.read_csv(file_name)
|
20 |
data_x = df[column1]
|
@@ -52,8 +52,8 @@ iface = gr.Interface(
|
|
52 |
gr.File(label="上传数据表格"),
|
53 |
gr.Textbox(label="指定第1个数据列名称"),
|
54 |
gr.Textbox(label="指定第2个数据列名称"),
|
55 |
-
|
56 |
-
|
57 |
],
|
58 |
outputs=[
|
59 |
gr.Dataframe(type='pandas', label="数据表的前5行"),
|
|
|
13 |
def process_data(file_name, column1, column2, is_continuous, bins):
|
14 |
# column1 = "身高"
|
15 |
# column2 = "心血管疾病"
|
16 |
+
# is_continuous = True
|
17 |
+
# bins = 5
|
18 |
# 读取数据
|
19 |
df = pd.read_csv(file_name)
|
20 |
data_x = df[column1]
|
|
|
52 |
gr.File(label="上传数据表格"),
|
53 |
gr.Textbox(label="指定第1个数据列名称"),
|
54 |
gr.Textbox(label="指定第2个数据列名称"),
|
55 |
+
gr.Checkbox(label="第1列数据是连续值类型", default=False),
|
56 |
+
gr.Slider(3, 6, label="如果第1列是连续值,要分为几组"),
|
57 |
],
|
58 |
outputs=[
|
59 |
gr.Dataframe(type='pandas', label="数据表的前5行"),
|