Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,7 +151,7 @@ with gr.Blocks() as demo:
|
|
| 151 |
det_confidence = gr.Slider(0.1, 1.0, 0.5, label="Detection Confidence Threshold", visible=False)
|
| 152 |
|
| 153 |
# Attach Visibility Logic
|
| 154 |
-
run_det.change(toggle_visibility, inputs=[run_det], outputs=[det_model])
|
| 155 |
run_seg.change(toggle_visibility, inputs=[run_seg], outputs=[seg_model])
|
| 156 |
run_depth.change(toggle_visibility, inputs=[run_depth], outputs=[depth_model])
|
| 157 |
|
|
@@ -180,16 +180,6 @@ with gr.Blocks() as demo:
|
|
| 180 |
# with gr.Tab("Download"):
|
| 181 |
# zip_out = gr.File()
|
| 182 |
|
| 183 |
-
def toggle_det(checked):
|
| 184 |
-
return [gr.update(visible=checked), gr.update(visible=checked)]
|
| 185 |
-
|
| 186 |
-
def toggle_seg(checked):
|
| 187 |
-
return [gr.update(visible=checked)]
|
| 188 |
-
|
| 189 |
-
def toggle_depth(checked):
|
| 190 |
-
return [gr.update(visible=checked)]
|
| 191 |
-
|
| 192 |
-
|
| 193 |
|
| 194 |
# Button Click Event
|
| 195 |
run.click(
|
|
|
|
| 151 |
det_confidence = gr.Slider(0.1, 1.0, 0.5, label="Detection Confidence Threshold", visible=False)
|
| 152 |
|
| 153 |
# Attach Visibility Logic
|
| 154 |
+
run_det.change(toggle_visibility, inputs=[run_det], outputs=[det_model, det_confidence])
|
| 155 |
run_seg.change(toggle_visibility, inputs=[run_seg], outputs=[seg_model])
|
| 156 |
run_depth.change(toggle_visibility, inputs=[run_depth], outputs=[depth_model])
|
| 157 |
|
|
|
|
| 180 |
# with gr.Tab("Download"):
|
| 181 |
# zip_out = gr.File()
|
| 182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
|
| 184 |
# Button Click Event
|
| 185 |
run.click(
|