Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -17,13 +17,21 @@ def predict(image):
|
|
17 |
# Get the plotted image with predictions
|
18 |
return results[0].plot()
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
# Create Gradio interface
|
21 |
demo = gr.Interface(
|
22 |
fn=predict,
|
23 |
inputs=gr.Image(),
|
24 |
outputs=gr.Image(),
|
25 |
-
title="
|
26 |
-
description="Upload an image to detect objects using YOLOv8"
|
|
|
27 |
)
|
28 |
|
29 |
-
demo.launch()
|
|
|
17 |
# Get the plotted image with predictions
|
18 |
return results[0].plot()
|
19 |
|
20 |
+
# Example images
|
21 |
+
examples = [
|
22 |
+
"exm_1.jpg",
|
23 |
+
"exm_2.jpg",
|
24 |
+
"exm_3.jpg"
|
25 |
+
]
|
26 |
+
|
27 |
# Create Gradio interface
|
28 |
demo = gr.Interface(
|
29 |
fn=predict,
|
30 |
inputs=gr.Image(),
|
31 |
outputs=gr.Image(),
|
32 |
+
title="HockeyAI",
|
33 |
+
description="Upload an image to detect 7 differnt objects using a finetuned YOLOv8 for Icek Hockey frames.",
|
34 |
+
examples=examples
|
35 |
)
|
36 |
|
37 |
+
demo.launch()
|