Spaces:
Build error
Build error
bug fix
Browse files
app.py
CHANGED
|
@@ -150,12 +150,13 @@ def predict_and_analyze(model_name, num_channels, dim, image):
|
|
| 150 |
|
| 151 |
image = image.reshape((num_channels, W, W))
|
| 152 |
print(image)
|
|
|
|
| 153 |
|
| 154 |
# W = int(np.sqrt(image.shape[1]))
|
| 155 |
|
| 156 |
# image = image.reshape((num_channels, W, W))
|
| 157 |
|
| 158 |
-
if len(image.shape != 4
|
| 159 |
image = image[np.newaxis, :, :, :]
|
| 160 |
|
| 161 |
input_image = np.sum(image[0, :, :, :], axis=0)
|
|
|
|
| 150 |
|
| 151 |
image = image.reshape((num_channels, W, W))
|
| 152 |
print(image)
|
| 153 |
+
print(type(image))
|
| 154 |
|
| 155 |
# W = int(np.sqrt(image.shape[1]))
|
| 156 |
|
| 157 |
# image = image.reshape((num_channels, W, W))
|
| 158 |
|
| 159 |
+
if len(image.shape) != 4:
|
| 160 |
image = image[np.newaxis, :, :, :]
|
| 161 |
|
| 162 |
input_image = np.sum(image[0, :, :, :], axis=0)
|