Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,9 +7,14 @@ from ultralytics import YOLO
|
|
7 |
# Load the trained model
|
8 |
|
9 |
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
|
12 |
|
|
|
13 |
|
14 |
# Define the class indices for figures and tables
|
15 |
figure_class_index = 3 # class index for figures
|
|
|
7 |
# Load the trained model
|
8 |
|
9 |
|
10 |
+
@spaces.GPU
|
11 |
+
def model_cov():
|
12 |
+
model = YOLO("best.pt")
|
13 |
+
model.export(format="engine") # creates 'yolov8n.engine'
|
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
|