Spaces:
Runtime error
Runtime error
eeshawn
commited on
Commit
·
f9ca8c8
1
Parent(s):
970da3d
update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,9 @@ def clear():
|
|
31 |
"""
|
32 |
Reset inputs.
|
33 |
"""
|
34 |
-
|
|
|
|
|
35 |
|
36 |
callback = gr.HuggingFaceDatasetSaver(hf_token=HF_TOKEN, dataset_name="crowdsourced_hand_seals", private=True)
|
37 |
|
@@ -77,7 +79,7 @@ with gr.Blocks() as demo:
|
|
77 |
|
78 |
clear_form.click(fn=clear, inputs=None, outputs=[img_input, conf_input], show_progress=False)
|
79 |
submit.click(fn=seal_detection, inputs=[img_input, conf_input], outputs=outputs)
|
80 |
-
flag.click(lambda *args: callback.flag(args), [img_input, conf_input, outputs], None, preprocess=False)
|
81 |
|
82 |
if __name__ == "__main__":
|
83 |
demo.queue(api_open=False, max_size=10)
|
|
|
31 |
"""
|
32 |
Reset inputs.
|
33 |
"""
|
34 |
+
image_update = gr.Image.update(value=None)
|
35 |
+
conf_update = gr.Slider.update(value=0.5)
|
36 |
+
return image_update, conf_update
|
37 |
|
38 |
callback = gr.HuggingFaceDatasetSaver(hf_token=HF_TOKEN, dataset_name="crowdsourced_hand_seals", private=True)
|
39 |
|
|
|
79 |
|
80 |
clear_form.click(fn=clear, inputs=None, outputs=[img_input, conf_input], show_progress=False)
|
81 |
submit.click(fn=seal_detection, inputs=[img_input, conf_input], outputs=outputs)
|
82 |
+
flag.click(lambda *args: callback.flag(args), [img_input, conf_input, outputs], None, preprocess=False, show_progress=False)
|
83 |
|
84 |
if __name__ == "__main__":
|
85 |
demo.queue(api_open=False, max_size=10)
|