trying to open with np
Browse files
app.py
CHANGED
@@ -131,8 +131,14 @@ def predict_and_analyze(model_name, num_channels, dim, image):
|
|
131 |
num_channels = int(num_channels)
|
132 |
W = int(dim)
|
133 |
|
134 |
-
image = image.read()
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
image = image.reshape((num_channels, W, W))
|
137 |
|
138 |
# W = int(np.sqrt(image.shape[1]))
|
|
|
131 |
num_channels = int(num_channels)
|
132 |
W = int(dim)
|
133 |
|
134 |
+
# image = image.read()
|
135 |
+
|
136 |
+
# with open(image, 'rb') as f:
|
137 |
+
# im = f.readlines()
|
138 |
+
# image = np.frombuffer(image)
|
139 |
+
|
140 |
+
image = np.open(image, allow_pickle=True)
|
141 |
+
|
142 |
image = image.reshape((num_channels, W, W))
|
143 |
|
144 |
# W = int(np.sqrt(image.shape[1]))
|