Spaces:
Running
Running
Change YOLOS output from image to gallery of images
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def detect_objects(img: Image.Image):
|
|
66 |
)
|
67 |
box_images.append(img.crop((box[0], box[1], box[2], box[3])))
|
68 |
|
69 |
-
return box_images
|
70 |
|
71 |
|
72 |
if __name__ == "__main__":
|
@@ -82,7 +82,7 @@ if __name__ == "__main__":
|
|
82 |
with gr.Tab("Object Detection"):
|
83 |
with gr.Row():
|
84 |
yolos_input = gr.Image(type="pil")
|
85 |
-
yolos_output = gr.
|
86 |
yolos_button = gr.Button("Submit")
|
87 |
|
88 |
with gr.Tab("Inference"):
|
|
|
66 |
)
|
67 |
box_images.append(img.crop((box[0], box[1], box[2], box[3])))
|
68 |
|
69 |
+
return box_images
|
70 |
|
71 |
|
72 |
if __name__ == "__main__":
|
|
|
82 |
with gr.Tab("Object Detection"):
|
83 |
with gr.Row():
|
84 |
yolos_input = gr.Image(type="pil")
|
85 |
+
yolos_output = gr.Gallery(label="Detected Objects", show_label=True)
|
86 |
yolos_button = gr.Button("Submit")
|
87 |
|
88 |
with gr.Tab("Inference"):
|