Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,9 @@ transform = T.Compose([
|
|
17 |
])
|
18 |
|
19 |
def predict(image):
|
20 |
-
# Preprocess the image
|
|
|
|
|
21 |
img_tensor = transform(image).unsqueeze(0) # Add batch dimension
|
22 |
|
23 |
# # Make prediction
|
|
|
17 |
])
|
18 |
|
19 |
def predict(image):
|
20 |
+
# Preprocess the image by converting the colour space to RGB
|
21 |
+
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
22 |
+
|
23 |
img_tensor = transform(image).unsqueeze(0) # Add batch dimension
|
24 |
|
25 |
# # Make prediction
|