Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,10 +4,10 @@ import numpy as np
|
|
4 |
from PIL import Image
|
5 |
from ultralytics import YOLO
|
6 |
|
7 |
-
# Load the YOLO model
|
8 |
-
#
|
9 |
-
|
10 |
-
model = YOLO(
|
11 |
|
12 |
# Define the prediction function for the Gradio interface.
|
13 |
# This function takes an input image and returns the annotated image.
|
|
|
4 |
from PIL import Image
|
5 |
from ultralytics import YOLO
|
6 |
|
7 |
+
# Load the YOLO model from the Hugging Face Hub.
|
8 |
+
# The path must include the repository ID AND the file name.
|
9 |
+
model_path = "Web4/LS-W4-SX-YOLO-Light-V1-Candy/my_model.pt"
|
10 |
+
model = YOLO(model_path)
|
11 |
|
12 |
# Define the prediction function for the Gradio interface.
|
13 |
# This function takes an input image and returns the annotated image.
|