Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,17 @@ def get_pipeline_prediction(pil_image):
|
|
10 |
processed_image = render_results_in_image(pil_image,
|
11 |
pipeline_output)
|
12 |
return processed_image
|
13 |
-
|
14 |
fn=get_pipeline_prediction,
|
15 |
inputs=gr.Image(label="Input image",
|
16 |
type="pil"),
|
17 |
outputs=gr.Image(label="Output image with predicted instances",
|
18 |
-
type="pil")
|
|
|
|
|
19 |
)
|
20 |
-
|
|
|
|
|
|
|
|
|
|
10 |
processed_image = render_results_in_image(pil_image,
|
11 |
pipeline_output)
|
12 |
return processed_image
|
13 |
+
object_detection_app = gr.Interface(
|
14 |
fn=get_pipeline_prediction,
|
15 |
inputs=gr.Image(label="Input image",
|
16 |
type="pil"),
|
17 |
outputs=gr.Image(label="Output image with predicted instances",
|
18 |
+
type="pil"),
|
19 |
+
title = "Object Detection",
|
20 |
+
description = "Facebook detr-resnet-50")
|
21 |
)
|
22 |
+
with gr.Blocks() as demo:
|
23 |
+
gr.TabbedInterface(
|
24 |
+
[object_detection_app],
|
25 |
+
["Object Detection"])
|
26 |
+
demo.launch()
|