Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,12 +9,15 @@ from ultralytics import YOLO
|
|
9 |
|
10 |
@spaces.GPU
|
11 |
def model_cov():
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
model_cov()
|
16 |
|
17 |
-
model =YOLO("best.engine")
|
18 |
|
19 |
# Define the class indices for figures and tables
|
20 |
figure_class_index = 3 # class index for figures
|
|
|
9 |
|
10 |
@spaces.GPU
|
11 |
def model_cov():
|
12 |
+
model_pt = YOLO("best.pt")
|
13 |
+
model_pt.export(format="engine") # creates 'yolov8n.engine'
|
14 |
+
model =YOLO("best.engine")
|
15 |
+
|
16 |
+
return model
|
17 |
+
|
18 |
+
model =model_cov()
|
19 |
|
|
|
20 |
|
|
|
21 |
|
22 |
# Define the class indices for figures and tables
|
23 |
figure_class_index = 3 # class index for figures
|