Update app.py
Browse files
app.py
CHANGED
@@ -5,21 +5,16 @@ from ultralytics import YOLO
|
|
5 |
model_path = "best.pt"
|
6 |
model = YOLO(model_path)
|
7 |
|
8 |
-
|
9 |
PREDICT_KWARGS = {
|
10 |
"conf": 0.15,
|
11 |
}
|
12 |
|
13 |
-
|
14 |
def run(image_path):
|
15 |
results = model.predict(image_path, **PREDICT_KWARGS)
|
16 |
return results[0].plot()[:, :, ::-1] # reverse channels for gradio
|
17 |
|
18 |
-
|
19 |
title = "OOI RCA Digital Still Camera Benthic Megafauna Detector"
|
20 |
-
description =
|
21 |
-
""
|
22 |
-
)
|
23 |
|
24 |
examples = glob.glob("images/*.png")
|
25 |
|
@@ -33,4 +28,3 @@ interface = gr.Interface(
|
|
33 |
)
|
34 |
|
35 |
interface.queue().launch()
|
36 |
-
|
|
|
5 |
model_path = "best.pt"
|
6 |
model = YOLO(model_path)
|
7 |
|
|
|
8 |
PREDICT_KWARGS = {
|
9 |
"conf": 0.15,
|
10 |
}
|
11 |
|
|
|
12 |
def run(image_path):
|
13 |
results = model.predict(image_path, **PREDICT_KWARGS)
|
14 |
return results[0].plot()[:, :, ::-1] # reverse channels for gradio
|
15 |
|
|
|
16 |
title = "OOI RCA Digital Still Camera Benthic Megafauna Detector"
|
17 |
+
description = ""
|
|
|
|
|
18 |
|
19 |
examples = glob.glob("images/*.png")
|
20 |
|
|
|
28 |
)
|
29 |
|
30 |
interface.queue().launch()
|
|