Web4 commited on
Commit
bae4382
·
verified ·
1 Parent(s): f9feb53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 directly from the Hugging Face Hub.
8
- # Use the full repository ID: "username/model_repo_name".
9
- model_id = "Web4/LS-W4-SX-YOLO-Light-V1-Candy"
10
- model = YOLO(model_id)
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.