Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,9 +4,9 @@ from PIL import Image
|
|
| 4 |
import numpy as np
|
| 5 |
import cv2
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
|
| 10 |
|
| 11 |
def identify_disease(image):
|
| 12 |
# Convert the image to RGB if it's not
|
|
|
|
| 4 |
import numpy as np
|
| 5 |
import cv2
|
| 6 |
|
| 7 |
+
# This should download the model if not available locally
|
| 8 |
+
model = YOLO('yolov8n.pt') # Using a YOLOv8 model which is often smaller and compatible
|
| 9 |
+
# Change to a leaf disease detection model if available
|
| 10 |
|
| 11 |
def identify_disease(image):
|
| 12 |
# Convert the image to RGB if it's not
|