Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,11 +78,14 @@ with gr.Blocks() as demo:
|
|
| 78 |
with gr.Row():
|
| 79 |
with gr.Column():
|
| 80 |
img_input = gr.Image(type="pil", label="Upload an Image")
|
|
|
|
|
|
|
|
|
|
| 81 |
submit_btn = gr.Button("Submit")
|
| 82 |
with gr.Column():
|
| 83 |
output = gr.Image(type="pil", label="Prediction Result")
|
| 84 |
|
| 85 |
-
submit_btn.click(fn=inference, inputs=[img_input,
|
| 86 |
demo.load(reset_interface, None, [output])
|
| 87 |
|
| 88 |
with gr.Row():
|
|
@@ -92,3 +95,4 @@ with gr.Blocks() as demo:
|
|
| 92 |
)
|
| 93 |
|
| 94 |
demo.launch()
|
|
|
|
|
|
| 78 |
with gr.Row():
|
| 79 |
with gr.Column():
|
| 80 |
img_input = gr.Image(type="pil", label="Upload an Image")
|
| 81 |
+
mode_input = gr.Radio(choices=["predict", "dir_predict"], label="Mode", value="predict")
|
| 82 |
+
crop_input = gr.Checkbox(value=False, label="Crop")
|
| 83 |
+
count_input = gr.Checkbox(value=True, label="Count")
|
| 84 |
submit_btn = gr.Button("Submit")
|
| 85 |
with gr.Column():
|
| 86 |
output = gr.Image(type="pil", label="Prediction Result")
|
| 87 |
|
| 88 |
+
submit_btn.click(fn=inference, inputs=[img_input, mode_input, crop_input, count_input], outputs=output)
|
| 89 |
demo.load(reset_interface, None, [output])
|
| 90 |
|
| 91 |
with gr.Row():
|
|
|
|
| 95 |
)
|
| 96 |
|
| 97 |
demo.launch()
|
| 98 |
+
|