Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ model_path = 'best.pt' # Replace with the path to your trained .pt file
|
|
8 |
model = YOLO(model_path)
|
9 |
|
10 |
# Function to perform inference on an image
|
|
|
11 |
def infer_image(image):
|
12 |
# Convert the image from BGR to RGB
|
13 |
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
|
|
8 |
model = YOLO(model_path)
|
9 |
|
10 |
# Function to perform inference on an image
|
11 |
+
@spaces.GPU
|
12 |
def infer_image(image):
|
13 |
# Convert the image from BGR to RGB
|
14 |
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|