Update app.py
Browse files
app.py
CHANGED
|
@@ -247,19 +247,21 @@ class GradioApp:
|
|
| 247 |
# π¬ Interstitial Cell of Cajal Detection and Quantification Tool
|
| 248 |
|
| 249 |
Upload a microscopy image to automatically detect and count Interstitial Cells of Cajal (ICC).
|
| 250 |
-
Adjust the detection parameters below for optimal results.
|
| 251 |
"""
|
| 252 |
)
|
| 253 |
|
| 254 |
with gr.Row():
|
| 255 |
# Left column - Input and controls
|
| 256 |
with gr.Column(scale=1):
|
| 257 |
-
# Examples section
|
| 258 |
-
gr.Markdown("### π Example
|
|
|
|
|
|
|
| 259 |
input_img = gr.Image(
|
| 260 |
-
label="
|
| 261 |
type="numpy",
|
| 262 |
-
interactive=True
|
|
|
|
| 263 |
)
|
| 264 |
|
| 265 |
example_root = os.path.dirname(__file__)
|
|
@@ -275,18 +277,19 @@ class GradioApp:
|
|
| 275 |
inputs=[input_img],
|
| 276 |
)
|
| 277 |
|
|
|
|
| 278 |
gr.Markdown("### π€ Or Upload Your Own Image")
|
| 279 |
|
| 280 |
-
# Detection parameters
|
| 281 |
-
gr.
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
|
| 291 |
# Action buttons
|
| 292 |
with gr.Row():
|
|
|
|
| 247 |
# π¬ Interstitial Cell of Cajal Detection and Quantification Tool
|
| 248 |
|
| 249 |
Upload a microscopy image to automatically detect and count Interstitial Cells of Cajal (ICC).
|
|
|
|
| 250 |
"""
|
| 251 |
)
|
| 252 |
|
| 253 |
with gr.Row():
|
| 254 |
# Left column - Input and controls
|
| 255 |
with gr.Column(scale=1):
|
| 256 |
+
# Examples section - FIRST
|
| 257 |
+
gr.Markdown("### π Select an Example Image")
|
| 258 |
+
|
| 259 |
+
# Create input_img component first (needed for Examples)
|
| 260 |
input_img = gr.Image(
|
| 261 |
+
label="",
|
| 262 |
type="numpy",
|
| 263 |
+
interactive=True,
|
| 264 |
+
show_label=False
|
| 265 |
)
|
| 266 |
|
| 267 |
example_root = os.path.dirname(__file__)
|
|
|
|
| 277 |
inputs=[input_img],
|
| 278 |
)
|
| 279 |
|
| 280 |
+
# Upload section - SECOND
|
| 281 |
gr.Markdown("### π€ Or Upload Your Own Image")
|
| 282 |
|
| 283 |
+
# Detection parameters - COLLAPSIBLE
|
| 284 |
+
with gr.Accordion("βοΈ Advanced Settings", open=False):
|
| 285 |
+
confidence_slider = gr.Slider(
|
| 286 |
+
minimum=0.01,
|
| 287 |
+
maximum=1.0,
|
| 288 |
+
value=0.1,
|
| 289 |
+
step=0.01,
|
| 290 |
+
label="Confidence Threshold",
|
| 291 |
+
info="Minimum confidence for a detection"
|
| 292 |
+
)
|
| 293 |
|
| 294 |
# Action buttons
|
| 295 |
with gr.Row():
|