Spaces:
Runtime error
Runtime error
Commit
•
f8c6742
1
Parent(s):
f804b19
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def jaccard_coef(y_true, y_pred):
|
|
11 |
final_coef_value = (intersection + 1.0) / (K.sum(y_true_flatten) + K.sum(y_pred_flatten) - intersection + 1.0)
|
12 |
return final_coef_value
|
13 |
|
14 |
-
model = load_model('
|
15 |
image = gr.inputs.Image(shape = (256,256))
|
16 |
def predict_image(image):
|
17 |
test_image_input = np.expand_dims(image, 0)
|
|
|
11 |
final_coef_value = (intersection + 1.0) / (K.sum(y_true_flatten) + K.sum(y_pred_flatten) - intersection + 1.0)
|
12 |
return final_coef_value
|
13 |
|
14 |
+
model = load_model('S_model.h5',custom_objects=({"jaccard_coef":jaccard_coef}))
|
15 |
image = gr.inputs.Image(shape = (256,256))
|
16 |
def predict_image(image):
|
17 |
test_image_input = np.expand_dims(image, 0)
|