ayoubsa commited on
Commit
3300f09
·
verified ·
1 Parent(s): 36fca89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -136,7 +136,8 @@ from PIL import Image
136
  import numpy as np
137
 
138
  # Load the YOLO model
139
- model = torch.hub.load('ultralytics/yolov5', 'custom', path='https://huggingface.co/ayoubsa/yolo_model/resolve/main/best.pt') # Replace with your uploaded model's path
 
140
 
141
  # Define the prediction function
142
  def predict(image):
 
136
  import numpy as np
137
 
138
  # Load the YOLO model
139
+ MODEL_URL= 'https://huggingface.co/ayoubsa/yolo_model/resolve/main/best.pt'
140
+ model = YOLO(MODEL_URL)
141
 
142
  # Define the prediction function
143
  def predict(image):