zliang commited on
Commit
00b850b
·
verified ·
1 Parent(s): 041f53d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -7,9 +7,14 @@ from ultralytics import YOLO
7
  # Load the trained model
8
 
9
 
 
 
 
 
10
 
11
- model = YOLO("best.pt")
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