Update app.py
Browse files
app.py
CHANGED
|
@@ -32,16 +32,13 @@ def run_inference(image):
|
|
| 32 |
# Create the Gradio interface
|
| 33 |
interface = gr.Interface(
|
| 34 |
fn=run_inference,
|
| 35 |
-
inputs=
|
| 36 |
-
gr.Image(type="pil", label="Upload Image"), # For file uploads
|
| 37 |
-
gr.Camera(type="pil", label="Capture from Camera") # For camera capture
|
| 38 |
-
],
|
| 39 |
outputs=[
|
| 40 |
gr.Image(type="pil"),
|
| 41 |
gr.Textbox(label="Object Counts", lines=5, interactive=False) # Display counts as text
|
| 42 |
],
|
| 43 |
title="YOLOv5 Object Detection with Counts",
|
| 44 |
-
description="Upload an image
|
| 45 |
)
|
| 46 |
|
| 47 |
# Launch the app
|
|
|
|
| 32 |
# Create the Gradio interface
|
| 33 |
interface = gr.Interface(
|
| 34 |
fn=run_inference,
|
| 35 |
+
inputs=gr.Image(type="pil"),
|
|
|
|
|
|
|
|
|
|
| 36 |
outputs=[
|
| 37 |
gr.Image(type="pil"),
|
| 38 |
gr.Textbox(label="Object Counts", lines=5, interactive=False) # Display counts as text
|
| 39 |
],
|
| 40 |
title="YOLOv5 Object Detection with Counts",
|
| 41 |
+
description="Upload an image to run YOLOv5 object detection, see the annotated results, and view the count of detected objects by category."
|
| 42 |
)
|
| 43 |
|
| 44 |
# Launch the app
|