Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import warnings
|
|
11 |
warnings.filterwarnings(action='ignore', category=UserWarning)
|
12 |
|
13 |
# 设置中文字体和编码
|
14 |
-
plt.rcParams['font.sans-serif'] = ['
|
15 |
plt.rcParams['axes.unicode_minus'] = False # 设置正常显示字符
|
16 |
|
17 |
def process_file(file):
|
@@ -77,7 +77,7 @@ with gr.Blocks() as demo:
|
|
77 |
file_input = gr.File(label="上传表格文件(支持CSV、XLS、XLSX等格式", file_types=["csv", "xls", "xlsx"])
|
78 |
col1_dropdown = gr.Dropdown(label="请选择特征列", visible=False)
|
79 |
col2_dropdown = gr.Dropdown(label="选择标签列", visible=False)
|
80 |
-
choice_radio = gr.Radio(["是", "否"], label="特征列是否为连续值",
|
81 |
slider = gr.Slider(minimum=3, maximum=7, step=1, label="选择将特征列分组的分组数", visible=False, value=4)
|
82 |
submit_button = gr.Button("查看结果", visible=False)
|
83 |
with gr.Column():
|
|
|
11 |
warnings.filterwarnings(action='ignore', category=UserWarning)
|
12 |
|
13 |
# 设置中文字体和编码
|
14 |
+
plt.rcParams['font.sans-serif'] = ['SimHei'] # 选择合适的中文字体,这里使用黑体
|
15 |
plt.rcParams['axes.unicode_minus'] = False # 设置正常显示字符
|
16 |
|
17 |
def process_file(file):
|
|
|
77 |
file_input = gr.File(label="上传表格文件(支持CSV、XLS、XLSX等格式", file_types=["csv", "xls", "xlsx"])
|
78 |
col1_dropdown = gr.Dropdown(label="请选择特征列", visible=False)
|
79 |
col2_dropdown = gr.Dropdown(label="选择标签列", visible=False)
|
80 |
+
choice_radio = gr.Radio(["是", "否"], label="特征列是否为连续值", value="是", visible=False)
|
81 |
slider = gr.Slider(minimum=3, maximum=7, step=1, label="选择将特征列分组的分组数", visible=False, value=4)
|
82 |
submit_button = gr.Button("查看结果", visible=False)
|
83 |
with gr.Column():
|