zxcvb6958 commited on
Commit
e76b204
·
1 Parent(s): 5287c76

update UI

Browse files
Files changed (1) hide show
  1. app.py +19 -7
app.py CHANGED
@@ -126,7 +126,7 @@ def diagnose_demo(img_name):
126
  suggestion = SUGGESTION_DICT.get(main_cat, "建议:请咨询医生。")
127
  return result_table, result_text, suggestion
128
 
129
- # --- 按钮 CSS ---
130
  css = """
131
  .orange-btn {
132
  background: #FF7F1F !important;
@@ -151,9 +151,21 @@ css = """
151
  .button-row {
152
  margin-top: 16px;
153
  }
154
- .gr-box .gr-block.gr-group {
155
- box-shadow: none;
156
- border: none;
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
  """
159
 
@@ -202,10 +214,10 @@ with gr.Blocks(title="AI内窥镜影像辅助分析系统") as demo:
202
  seg_btn.click(fn=segment_demo, inputs=seg_select, outputs=seg_output_img)
203
  seg_reset_btn.click(fn=reset_seg, inputs=None, outputs=[seg_select, seg_input_img, seg_output_img])
204
 
205
- # 第二行:疾病诊断Box包围三列
206
  with gr.Row():
207
- with gr.Box():
208
- gr.Markdown("<span style='font-size: 22px; font-weight: bold;'>疾病分类模块</span>")
209
  with gr.Row():
210
  # 1. 输入图片+按钮
211
  with gr.Column():
 
126
  suggestion = SUGGESTION_DICT.get(main_cat, "建议:请咨询医生。")
127
  return result_table, result_text, suggestion
128
 
129
+ # --- CSS ---
130
  css = """
131
  .orange-btn {
132
  background: #FF7F1F !important;
 
151
  .button-row {
152
  margin-top: 16px;
153
  }
154
+ .diagnosis-group {
155
+ border: 2px solid #dadce0 !important;
156
+ border-radius: 15px !important;
157
+ padding: 28px 12px 24px 12px !important;
158
+ margin-top: 16px !important;
159
+ margin-bottom: 16px !important;
160
+ background: #FAFAFA !important;
161
+ box-shadow: 0 2px 6px 0 rgba(60,64,67,.11),0 1.5px 5px 0 rgba(60,64,67,.11);
162
+ }
163
+ .diagnosis-title {
164
+ font-size: 22px;
165
+ font-weight: bold;
166
+ margin-bottom: 14px;
167
+ margin-left: 6px;
168
+ color: #ff7f1f;
169
  }
170
  """
171
 
 
214
  seg_btn.click(fn=segment_demo, inputs=seg_select, outputs=seg_output_img)
215
  seg_reset_btn.click(fn=reset_seg, inputs=None, outputs=[seg_select, seg_input_img, seg_output_img])
216
 
217
+ # 第二行:疾病诊断,Group加大边框
218
  with gr.Row():
219
+ with gr.Group(elem_classes="diagnosis-group"):
220
+ gr.HTML(f"<div class='diagnosis-title'>疾病分类模块</div>")
221
  with gr.Row():
222
  # 1. 输入图片+按钮
223
  with gr.Column():