Laborator commited on
Commit
765ef33
·
verified ·
1 Parent(s): 1629822

Fix Gradio compatibility: remove unsupported label param from Markdown

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -570,10 +570,10 @@ with gr.Blocks(title="Microscopy CV Toolkit", css=css, theme=gr.themes.Base()) a
570
  with gr.Row():
571
  with gr.Column(scale=1):
572
  focus_input = gr.Image(label="Upload Image", type="numpy")
573
- focus_btn = gr.Button("Analyze Focus", variant="primary", size="lg")
574
  with gr.Column(scale=2):
575
  focus_output = gr.Image(label="Focus Heatmap", type="numpy")
576
- focus_report = gr.Markdown(label="Report")
577
 
578
  focus_btn.click(
579
  fn=analyze_focus,
@@ -590,10 +590,10 @@ with gr.Blocks(title="Microscopy CV Toolkit", css=css, theme=gr.themes.Base()) a
590
  with gr.Row():
591
  with gr.Column(scale=1):
592
  illum_input = gr.Image(label="Upload Image", type="numpy")
593
- illum_btn = gr.Button("Analyze Illumination", variant="primary", size="lg")
594
  with gr.Column(scale=2):
595
  illum_output = gr.Image(label="Analysis", type="numpy")
596
- illum_report = gr.Markdown(label="Report")
597
 
598
  illum_btn.click(
599
  fn=analyze_illumination,
@@ -610,10 +610,10 @@ with gr.Blocks(title="Microscopy CV Toolkit", css=css, theme=gr.themes.Base()) a
610
  with gr.Row():
611
  with gr.Column(scale=1):
612
  type_input = gr.Image(label="Upload Image", type="numpy")
613
- type_btn = gr.Button("Detect Type", variant="primary", size="lg")
614
  with gr.Column(scale=2):
615
  type_output = gr.Image(label="Analysis", type="numpy")
616
- type_report = gr.Markdown(label="Report")
617
 
618
  type_btn.click(
619
  fn=detect_microscopy_type,
@@ -645,11 +645,11 @@ with gr.Blocks(title="Microscopy CV Toolkit", css=css, theme=gr.themes.Base()) a
645
  unsharp_sigma = gr.Slider(0.5, 5.0, value=2.0, step=0.5, label="Unsharp Sigma")
646
  unsharp_strength = gr.Slider(0.5, 5.0, value=1.5, step=0.5, label="Unsharp Strength")
647
  denoise_h = gr.Slider(1.0, 30.0, value=10.0, step=1.0, label="Denoise Strength (h)")
648
- enhance_btn = gr.Button("Enhance", variant="primary", size="lg")
649
  with gr.Column(scale=2):
650
  enhance_comparison = gr.Image(label="Before / After", type="numpy")
651
  enhance_result = gr.Image(label="Enhanced Image (downloadable)", type="numpy")
652
- enhance_report = gr.Markdown(label="Report")
653
 
654
  enhance_btn.click(
655
  fn=enhance_image,
 
570
  with gr.Row():
571
  with gr.Column(scale=1):
572
  focus_input = gr.Image(label="Upload Image", type="numpy")
573
+ focus_btn = gr.Button("Analyze Focus", variant="primary")
574
  with gr.Column(scale=2):
575
  focus_output = gr.Image(label="Focus Heatmap", type="numpy")
576
+ focus_report = gr.Markdown()
577
 
578
  focus_btn.click(
579
  fn=analyze_focus,
 
590
  with gr.Row():
591
  with gr.Column(scale=1):
592
  illum_input = gr.Image(label="Upload Image", type="numpy")
593
+ illum_btn = gr.Button("Analyze Illumination", variant="primary")
594
  with gr.Column(scale=2):
595
  illum_output = gr.Image(label="Analysis", type="numpy")
596
+ illum_report = gr.Markdown()
597
 
598
  illum_btn.click(
599
  fn=analyze_illumination,
 
610
  with gr.Row():
611
  with gr.Column(scale=1):
612
  type_input = gr.Image(label="Upload Image", type="numpy")
613
+ type_btn = gr.Button("Detect Type", variant="primary")
614
  with gr.Column(scale=2):
615
  type_output = gr.Image(label="Analysis", type="numpy")
616
+ type_report = gr.Markdown()
617
 
618
  type_btn.click(
619
  fn=detect_microscopy_type,
 
645
  unsharp_sigma = gr.Slider(0.5, 5.0, value=2.0, step=0.5, label="Unsharp Sigma")
646
  unsharp_strength = gr.Slider(0.5, 5.0, value=1.5, step=0.5, label="Unsharp Strength")
647
  denoise_h = gr.Slider(1.0, 30.0, value=10.0, step=1.0, label="Denoise Strength (h)")
648
+ enhance_btn = gr.Button("Enhance", variant="primary")
649
  with gr.Column(scale=2):
650
  enhance_comparison = gr.Image(label="Before / After", type="numpy")
651
  enhance_result = gr.Image(label="Enhanced Image (downloadable)", type="numpy")
652
+ enhance_report = gr.Markdown()
653
 
654
  enhance_btn.click(
655
  fn=enhance_image,