Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def classify(image_path):
|
|
26 |
image_data = np.array(image_path)
|
27 |
image_data = cv.resize(image_data, (224, 224))
|
28 |
image_array = np.asarray(image_data)
|
29 |
-
normalized_image_array = (image_array.astype(np
|
30 |
data[0] = normalized_image_array
|
31 |
|
32 |
# Load the model within the classify function
|
|
|
26 |
image_data = np.array(image_path)
|
27 |
image_data = cv.resize(image_data, (224, 224))
|
28 |
image_array = np.asarray(image_data)
|
29 |
+
normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1
|
30 |
data[0] = normalized_image_array
|
31 |
|
32 |
# Load the model within the classify function
|