Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,13 +60,14 @@ def predict(in_pil_img):
|
|
| 60 |
return output_pil_img
|
| 61 |
|
| 62 |
|
| 63 |
-
|
| 64 |
-
output = gr.Image(label="Output image with predicted instances", type="pil")
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
outputs=output,
|
| 71 |
-
)
|
| 72 |
-
interface.launch(debug=True)
|
|
|
|
| 60 |
return output_pil_img
|
| 61 |
|
| 62 |
|
| 63 |
+
with gr.Blocks(title="Object Detection") as demo:
|
|
|
|
| 64 |
|
| 65 |
+
with gr.Row():
|
| 66 |
+
input_image = gr.Image(label="Input image", type="pil")
|
| 67 |
+
output_image = gr.Image(label="Output image with predicted instances", type="pil")
|
| 68 |
+
send_btn = gr.Button("Infer")
|
| 69 |
+
send_btn.click(fn=predict, inputs=[model, input_image], outputs=[output_image])
|
| 70 |
|
| 71 |
+
|
| 72 |
+
#demo.queue()
|
| 73 |
+
demo.launch(debug=True)
|
|
|
|
|
|
|
|
|