Spaces:
Runtime error
Runtime error
Add large model and more image examples
Browse files- app.py +6 -1
- examples/ex5.jpg +0 -0
- examples/ex6.jpg +0 -0
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import yolov5
|
|
| 5 |
models = {
|
| 6 |
"yolov5s": yolov5.load("akbojda/yolov5s-aquarium"),
|
| 7 |
"yolov5m": yolov5.load("akbojda/yolov5m-aquarium"),
|
|
|
|
| 8 |
}
|
| 9 |
|
| 10 |
def predict(img, model_type):
|
|
@@ -17,7 +18,9 @@ def predict(img, model_type):
|
|
| 17 |
# Interface
|
| 18 |
inputs = [
|
| 19 |
gr.Image(),
|
| 20 |
-
gr.Dropdown(["yolov5s", "yolov5m"
|
|
|
|
|
|
|
| 21 |
]
|
| 22 |
|
| 23 |
outputs = [
|
|
@@ -29,6 +32,8 @@ examples = [
|
|
| 29 |
["examples/ex2.jpg", None],
|
| 30 |
["examples/ex3.jpg", None],
|
| 31 |
["examples/ex4.jpg", None],
|
|
|
|
|
|
|
| 32 |
]
|
| 33 |
|
| 34 |
title = "Aquarium object detection"
|
|
|
|
| 5 |
models = {
|
| 6 |
"yolov5s": yolov5.load("akbojda/yolov5s-aquarium"),
|
| 7 |
"yolov5m": yolov5.load("akbojda/yolov5m-aquarium"),
|
| 8 |
+
"yolov5l": yolov5.load("akbojda/yolov5l-aquarium"),
|
| 9 |
}
|
| 10 |
|
| 11 |
def predict(img, model_type):
|
|
|
|
| 18 |
# Interface
|
| 19 |
inputs = [
|
| 20 |
gr.Image(),
|
| 21 |
+
gr.Dropdown(["yolov5s", "yolov5m", "yolov5l"],
|
| 22 |
+
label="Model",
|
| 23 |
+
value="yolov5s"),
|
| 24 |
]
|
| 25 |
|
| 26 |
outputs = [
|
|
|
|
| 32 |
["examples/ex2.jpg", None],
|
| 33 |
["examples/ex3.jpg", None],
|
| 34 |
["examples/ex4.jpg", None],
|
| 35 |
+
["examples/ex5.jpg", None],
|
| 36 |
+
["examples/ex6.jpg", None],
|
| 37 |
]
|
| 38 |
|
| 39 |
title = "Aquarium object detection"
|
examples/ex5.jpg
ADDED
|
examples/ex6.jpg
ADDED
|