Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -131,6 +131,8 @@ def weighted_categorical_crossentropy(weights):
|
|
131 |
return bce_dice(y_true, y_pred) * K.sum(y_true * Kweights, axis=-1)
|
132 |
return wcce
|
133 |
|
|
|
|
|
134 |
# Load the model
|
135 |
#model = tf.keras.models.load_model("model.h5", custom_objects={"jacard":jacard, "wcce":weighted_categorical_crossentropy})
|
136 |
#model = tf.keras.models.load_model("model_2.h5", custom_objects={"jacard":jacard, "bce_dice":bce_dice})
|
|
|
131 |
return bce_dice(y_true, y_pred) * K.sum(y_true * Kweights, axis=-1)
|
132 |
return wcce
|
133 |
|
134 |
+
from tensorflow.python.keras.utils import generic_utils
|
135 |
+
|
136 |
# Load the model
|
137 |
#model = tf.keras.models.load_model("model.h5", custom_objects={"jacard":jacard, "wcce":weighted_categorical_crossentropy})
|
138 |
#model = tf.keras.models.load_model("model_2.h5", custom_objects={"jacard":jacard, "bce_dice":bce_dice})
|