Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ model = YOLO('mouseFeetDetection.pt')
|
|
8 |
|
9 |
# Define the prediction function for YOLO model
|
10 |
def predict(image):
|
11 |
-
|
12 |
-
|
13 |
image = Image.fromarray(np.array(image))
|
14 |
results = model(image)
|
15 |
annotated_image = results[0].plot()
|
|
|
8 |
|
9 |
# Define the prediction function for YOLO model
|
10 |
def predict(image):
|
11 |
+
if image is None:
|
12 |
+
return None
|
13 |
image = Image.fromarray(np.array(image))
|
14 |
results = model(image)
|
15 |
annotated_image = results[0].plot()
|