Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,6 +88,9 @@ def iou(y_true, y_pred, smooth=1):
|
|
| 88 |
union = total - intersection
|
| 89 |
return (intersection + smooth) / (union + smooth)
|
| 90 |
|
|
|
|
|
|
|
|
|
|
| 91 |
# Load the models
|
| 92 |
def load_models():
|
| 93 |
global classification_model, segmentation_model
|
|
@@ -98,7 +101,7 @@ def load_models():
|
|
| 98 |
classification_model = load_model(classification_path, compile=False)
|
| 99 |
|
| 100 |
segmentation_model = load_model(
|
| 101 |
-
|
| 102 |
compile=False,
|
| 103 |
custom_objects={
|
| 104 |
'dice_coefficient': dice_coefficient,
|
|
|
|
| 88 |
union = total - intersection
|
| 89 |
return (intersection + smooth) / (union + smooth)
|
| 90 |
|
| 91 |
+
classification_model = None
|
| 92 |
+
segmentation_model = None
|
| 93 |
+
|
| 94 |
# Load the models
|
| 95 |
def load_models():
|
| 96 |
global classification_model, segmentation_model
|
|
|
|
| 101 |
classification_model = load_model(classification_path, compile=False)
|
| 102 |
|
| 103 |
segmentation_model = load_model(
|
| 104 |
+
segmentation_path,
|
| 105 |
compile=False,
|
| 106 |
custom_objects={
|
| 107 |
'dice_coefficient': dice_coefficient,
|