zliang commited on
Commit
77605d5
1 Parent(s): f0de3cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -6,11 +6,15 @@ from ultralytics import YOLOv10
6
 
7
  # Load the trained model
8
 
 
 
 
9
 
10
- model = YOLOv10("best.pt")
11
-
12
- model.export(format='engine',imgsz=640, iou=0.7, device = 0, simplify=True, half = True, workspace=8)
13
 
 
14
 
15
  # Define the class indices for figures and tables
16
  figure_class_index = 3 # class index for figures
 
6
 
7
  # Load the trained model
8
 
9
+ @spaces.GPU
10
+ def model_cv()
11
+ model = YOLOv10("best.pt")
12
 
13
+ model.export(format='engine',imgsz=640, iou=0.7, device = 0, simplify=True, half = True, workspace=8)
14
+ model = YOLOv10('yolov10l.engine', task='detect')
15
+ return model
16
 
17
+ model = model_cv()
18
 
19
  # Define the class indices for figures and tables
20
  figure_class_index = 3 # class index for figures