Spaces:
Runtime error
Runtime error
eeshawn
commited on
Commit
·
4ed163a
1
Parent(s):
899e480
update app.py
Browse files
app.py
CHANGED
@@ -59,10 +59,10 @@ with gr.Blocks() as demo:
|
|
59 |
)
|
60 |
with gr.Row():
|
61 |
with gr.Column():
|
62 |
-
inputs = [
|
63 |
-
|
64 |
-
|
65 |
-
]
|
66 |
with gr.Row():
|
67 |
clear_form = gr.Button("Reset")
|
68 |
submit = gr.Button("Predict")
|
@@ -80,8 +80,8 @@ with gr.Blocks() as demo:
|
|
80 |
# callback_inputs = [inputs, outputs]
|
81 |
# callback.setup(callback_inputs, "flagged_data")
|
82 |
|
83 |
-
clear_form.click(fn=clear, inputs=None, outputs=[
|
84 |
-
submit.click(fn=seal_detection, inputs=
|
85 |
# flag.click(lambda *args: callback.flag(args), inputs=callback_inputs, outputs=None, preprocess=False, show_progress=False)
|
86 |
|
87 |
if __name__ == "__main__":
|
|
|
59 |
)
|
60 |
with gr.Row():
|
61 |
with gr.Column():
|
62 |
+
# inputs = [
|
63 |
+
image = gr.Image(source="upload", type="pil", label="Image Upload", interactive=True),
|
64 |
+
slider = gr.Slider(minimum=0.05, maximum=1.0, value=0.5, step=0.05, label="Confidence Threshold"),
|
65 |
+
# ]
|
66 |
with gr.Row():
|
67 |
clear_form = gr.Button("Reset")
|
68 |
submit = gr.Button("Predict")
|
|
|
80 |
# callback_inputs = [inputs, outputs]
|
81 |
# callback.setup(callback_inputs, "flagged_data")
|
82 |
|
83 |
+
clear_form.click(fn=clear, inputs=None, outputs=[image, slider, outputs], show_progress=False)
|
84 |
+
submit.click(fn=seal_detection, inputs=[image, slider], outputs=outputs)
|
85 |
# flag.click(lambda *args: callback.flag(args), inputs=callback_inputs, outputs=None, preprocess=False, show_progress=False)
|
86 |
|
87 |
if __name__ == "__main__":
|