zliang commited on
Commit
35b67cb
·
verified ·
1 Parent(s): 0014b69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -6,17 +6,15 @@ import spaces
6
 
7
  # Load the trained model
8
 
9
- # Load the YOLOv8 model
10
- pt_model = YOLO("best.pt")
11
 
12
- # Export the model to TensorRT format
13
  @spaces.GPU
14
  def model_c():
15
- pt_model.export(format="engine") # creates 'yolov8n.engine'
 
16
 
17
  model_c()
18
  # Load the exported TensorRT model
19
- model = YOLO("best.engine")
20
 
21
  # Define the class indices for figures and tables
22
  figure_class_index = 3 # class index for figures
 
6
 
7
  # Load the trained model
8
 
 
 
9
 
 
10
  @spaces.GPU
11
  def model_c():
12
+ model = YOLO("best.pt")
13
+
14
 
15
  model_c()
16
  # Load the exported TensorRT model
17
+
18
 
19
  # Define the class indices for figures and tables
20
  figure_class_index = 3 # class index for figures