Spaces:
Runtime error
Runtime error
Commit ·
ea20254
1
Parent(s): 09f51f6
fix image pil issue
Browse files
app.py
CHANGED
|
@@ -59,7 +59,7 @@ model.compile(metrics=metrics)
|
|
| 59 |
def predict(ash_image, model=model):
|
| 60 |
#label = np.load(label_image)
|
| 61 |
#ash_image = np.load(ash_image)[...,4]
|
| 62 |
-
ash_image = np.asarray(
|
| 63 |
y_pred = model.predict(ash_image.reshape(1,256, 256, 3))
|
| 64 |
prediction = np.argmax(y_pred[0], axis=2).reshape(256,256,1)
|
| 65 |
#intersection = label & prediction
|
|
|
|
| 59 |
def predict(ash_image, model=model):
|
| 60 |
#label = np.load(label_image)
|
| 61 |
#ash_image = np.load(ash_image)[...,4]
|
| 62 |
+
ash_image = np.asarray(ash_image)
|
| 63 |
y_pred = model.predict(ash_image.reshape(1,256, 256, 3))
|
| 64 |
prediction = np.argmax(y_pred[0], axis=2).reshape(256,256,1)
|
| 65 |
#intersection = label & prediction
|