edeler commited on
Commit
e349241
Β·
verified Β·
1 Parent(s): 1245792

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -15
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 BEFORE upload
258
- gr.Markdown("### πŸ“‹ Example Images")
 
 
259
  input_img = gr.Image(
260
- label="Input Image",
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.Markdown("### βš™οΈ Detection Parameters")
282
- confidence_slider = gr.Slider(
283
- minimum=0.01,
284
- maximum=1.0,
285
- value=0.1,
286
- step=0.01,
287
- label="Confidence Threshold",
288
- info="Minimum confidence for a detection"
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():