Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def preprocess_image_classification(img_array):
|
|
39 |
return None
|
40 |
img = (img_array * 255).astype(np.uint8) # Convert back to uint8
|
41 |
img_array = cv2.resize(img, (224, 224)) # Resize to 224x224
|
42 |
-
|
43 |
return img_array
|
44 |
|
45 |
# Define the function to detect if the input is a mineral
|
|
|
39 |
return None
|
40 |
img = (img_array * 255).astype(np.uint8) # Convert back to uint8
|
41 |
img_array = cv2.resize(img, (224, 224)) # Resize to 224x224
|
42 |
+
# img_array is expected to be uint8 and with batch dimension
|
43 |
return img_array
|
44 |
|
45 |
# Define the function to detect if the input is a mineral
|