Update app.py
Browse files
app.py
CHANGED
@@ -14,11 +14,8 @@ labels = {name: index for index, name in enumerate(classes)}
|
|
14 |
num_classes = len(classes)
|
15 |
|
16 |
# Load the model
|
17 |
-
|
18 |
-
|
19 |
-
model = load_model(model_path)
|
20 |
-
except Exception as e:
|
21 |
-
raise RuntimeError(f"Failed to load model from {model_path}: {e}")
|
22 |
|
23 |
# Predict function for the interface
|
24 |
def predict_fn(image):
|
|
|
14 |
num_classes = len(classes)
|
15 |
|
16 |
# Load the model
|
17 |
+
from keras.models import load_model
|
18 |
+
model = load_model('sketch_recogination_model_cnn.h5')
|
|
|
|
|
|
|
19 |
|
20 |
# Predict function for the interface
|
21 |
def predict_fn(image):
|