Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def app():
|
|
| 42 |
with gr.Blocks():
|
| 43 |
with gr.Row():
|
| 44 |
with gr.Column():
|
| 45 |
-
image = gr.Image(type="pil", label="Image")
|
| 46 |
|
| 47 |
model_id = gr.Dropdown(
|
| 48 |
label="Model",
|
|
@@ -71,14 +71,14 @@ def app():
|
|
| 71 |
|
| 72 |
max_detection = gr.Slider(
|
| 73 |
label="Max Detection",
|
| 74 |
-
minimum=1
|
| 75 |
-
step=1
|
| 76 |
-
value=1
|
| 77 |
)
|
| 78 |
yolov_infer = gr.Button(value="Detect Objects")
|
| 79 |
|
| 80 |
with gr.Column():
|
| 81 |
-
output_image = gr.Image(type="pil", label="Annotated Image")
|
| 82 |
|
| 83 |
yolov_infer.click(
|
| 84 |
fn=yolo_inference,
|
|
|
|
| 42 |
with gr.Blocks():
|
| 43 |
with gr.Row():
|
| 44 |
with gr.Column():
|
| 45 |
+
image = gr.Image(type="pil", label="Image", interactive=True)
|
| 46 |
|
| 47 |
model_id = gr.Dropdown(
|
| 48 |
label="Model",
|
|
|
|
| 71 |
|
| 72 |
max_detection = gr.Slider(
|
| 73 |
label="Max Detection",
|
| 74 |
+
minimum=1,
|
| 75 |
+
step=1,
|
| 76 |
+
value=1,
|
| 77 |
)
|
| 78 |
yolov_infer = gr.Button(value="Detect Objects")
|
| 79 |
|
| 80 |
with gr.Column():
|
| 81 |
+
output_image = gr.Image(type="pil", label="Annotated Image", interactive=False)
|
| 82 |
|
| 83 |
yolov_infer.click(
|
| 84 |
fn=yolo_inference,
|