zliang commited on
Commit
3a96736
·
verified ·
1 Parent(s): 00b850b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -9,12 +9,15 @@ from ultralytics import YOLO
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
 
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