Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -219,7 +219,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 219 |
).then(fn=end_reset, inputs=None, outputs=[is_reset], queue=False)
|
| 220 |
|
| 221 |
# Live updates
|
| 222 |
-
def maybe_infer(is_reset, *args):
|
| 223 |
if is_reset:
|
| 224 |
return gr.update(), gr.update(), gr.update()
|
| 225 |
else:
|
|
@@ -233,7 +233,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 233 |
control_inputs_with_flag = [is_reset] + control_inputs
|
| 234 |
|
| 235 |
for control in [rotate_deg, move_forward, vertical_tilt, wideangle]:
|
| 236 |
-
control.
|
| 237 |
|
| 238 |
run_event.then(lambda img, *_: img, inputs=[result], outputs=[prev_output])
|
| 239 |
|
|
|
|
| 219 |
).then(fn=end_reset, inputs=None, outputs=[is_reset], queue=False)
|
| 220 |
|
| 221 |
# Live updates
|
| 222 |
+
def maybe_infer(is_reset, progress=gr.Progress(track_tqdm=True), *args):
|
| 223 |
if is_reset:
|
| 224 |
return gr.update(), gr.update(), gr.update()
|
| 225 |
else:
|
|
|
|
| 233 |
control_inputs_with_flag = [is_reset] + control_inputs
|
| 234 |
|
| 235 |
for control in [rotate_deg, move_forward, vertical_tilt, wideangle]:
|
| 236 |
+
control.release(fn=maybe_infer, inputs=control_inputs_with_flag, outputs=outputs)
|
| 237 |
|
| 238 |
run_event.then(lambda img, *_: img, inputs=[result], outputs=[prev_output])
|
| 239 |
|