Spaces:
Runtime error
Runtime error
eeshawn
commited on
Commit
•
ff83785
1
Parent(s):
f3d0af1
update app.py
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ with gr.Blocks() as demo:
|
|
70 |
submit = gr.Button("Predict")
|
71 |
with gr.Column():
|
72 |
outputs = gr.Image(type="filepath", label="Output Image", interactive=False)
|
73 |
-
flag = gr.Button("Flag")
|
74 |
|
75 |
with gr.Row():
|
76 |
gr.Examples(
|
@@ -80,6 +80,7 @@ with gr.Blocks() as demo:
|
|
80 |
fn=seal_detection,
|
81 |
run_on_click=True,
|
82 |
preprocess=False,
|
|
|
83 |
cache_examples=True,
|
84 |
)
|
85 |
|
@@ -90,11 +91,11 @@ with gr.Blocks() as demo:
|
|
90 |
"""
|
91 |
)
|
92 |
|
93 |
-
callback.setup([image, slider, outputs], "crowdsourced_hand_seals")
|
94 |
|
95 |
clear_form.click(fn=clear, inputs=None, outputs=[image[0], slider[0], outputs], show_progress=False)
|
96 |
submit.click(fn=seal_detection, inputs=[image[0], slider[0]], outputs=outputs)
|
97 |
-
flag.click(lambda *args: callback.flag([image[0], slider[0], outputs]), inputs=[image[0], slider[0], outputs], outputs=None, preprocess=False)
|
98 |
|
99 |
if __name__ == "__main__":
|
100 |
demo.queue(api_open=False, max_size=10)
|
|
|
70 |
submit = gr.Button("Predict")
|
71 |
with gr.Column():
|
72 |
outputs = gr.Image(type="filepath", label="Output Image", interactive=False)
|
73 |
+
# flag = gr.Button("Flag")
|
74 |
|
75 |
with gr.Row():
|
76 |
gr.Examples(
|
|
|
80 |
fn=seal_detection,
|
81 |
run_on_click=True,
|
82 |
preprocess=False,
|
83 |
+
postprocess=False,
|
84 |
cache_examples=True,
|
85 |
)
|
86 |
|
|
|
91 |
"""
|
92 |
)
|
93 |
|
94 |
+
# callback.setup([image, slider, outputs], "crowdsourced_hand_seals")
|
95 |
|
96 |
clear_form.click(fn=clear, inputs=None, outputs=[image[0], slider[0], outputs], show_progress=False)
|
97 |
submit.click(fn=seal_detection, inputs=[image[0], slider[0]], outputs=outputs)
|
98 |
+
# flag.click(lambda *args: callback.flag([image[0], slider[0], outputs]), inputs=[image[0], slider[0], outputs], outputs=None, preprocess=False)
|
99 |
|
100 |
if __name__ == "__main__":
|
101 |
demo.queue(api_open=False, max_size=10)
|