Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,8 @@ from ultralytics import YOLO
|
|
| 2 |
import gradio as gr
|
| 3 |
from PIL import Image
|
| 4 |
|
| 5 |
-
# Load YOLOv11 small model
|
| 6 |
-
model = YOLO("yolov11n")
|
| 7 |
|
| 8 |
def detect(image):
|
| 9 |
results = model.predict(source=image, device="cpu")
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
from PIL import Image
|
| 4 |
|
| 5 |
+
# Load YOLOv11 small model from local weights
|
| 6 |
+
model = YOLO("models/yolov11n.pt")
|
| 7 |
|
| 8 |
def detect(image):
|
| 9 |
results = model.predict(source=image, device="cpu")
|