Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
16 |
|
17 |
model_c()
|
18 |
# Load the exported TensorRT model
|
19 |
-
|
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
|