DurgaDeepak commited on
Commit
20f45fe
·
verified ·
1 Parent(s): 9ec45ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -149,14 +149,18 @@ with gr.Blocks() as demo:
149
  run_seg = gr.Checkbox(label="Semantic Segmentation")
150
  run_depth = gr.Checkbox(label="Depth Estimation")
151
 
152
- det_model = gr.Dropdown(choices=list(DETECTION_MODEL_MAP), label="Detection Model", visible=False)
 
 
 
 
153
  seg_model = gr.Dropdown(choices=list(SEGMENTATION_MODEL_MAP), label="Segmentation Model", visible=False)
154
  depth_model = gr.Dropdown(choices=list(DEPTH_MODEL_MAP), label="Depth Model", visible=False)
155
 
156
- det_confidence = gr.Slider(0.1, 1.0, 0.5, label="Detection Confidence Threshold", visible=False)
157
 
158
  # Attach Visibility Logic
159
- run_det.change(fn=toggle_det_visibility, inputs=[run_det], outputs=[det_model, det_confidence])
160
  run_seg.change(fn=toggle_visibility, inputs=[run_seg], outputs=[seg_model])
161
  run_depth.change(fn=toggle_visibility, inputs=[run_depth], outputs=[depth_model])
162
 
 
149
  run_seg = gr.Checkbox(label="Semantic Segmentation")
150
  run_depth = gr.Checkbox(label="Depth Estimation")
151
 
152
+ with gr.Accordion("Object Detection Settings", open=True, visible=False) as OD_Settings:
153
+ det_model = gr.Dropdown(choices=list(DETECTION_MODEL_MAP), label="Detection Model", visible=False)
154
+ det_confidence = gr.Slider(0.1, 1.0, 0.5, label="Detection Confidence Threshold", visible=False)
155
+
156
+
157
  seg_model = gr.Dropdown(choices=list(SEGMENTATION_MODEL_MAP), label="Segmentation Model", visible=False)
158
  depth_model = gr.Dropdown(choices=list(DEPTH_MODEL_MAP), label="Depth Model", visible=False)
159
 
160
+
161
 
162
  # Attach Visibility Logic
163
+ run_det.change(fn=toggle_det_visibility, inputs=[run_det], outputs=OD_Settings)
164
  run_seg.change(fn=toggle_visibility, inputs=[run_seg], outputs=[seg_model])
165
  run_depth.change(fn=toggle_visibility, inputs=[run_depth], outputs=[depth_model])
166