Apex-X commited on
Commit
e04d5aa
·
verified ·
1 Parent(s): 3b9f116

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
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
- model_path = 'sketch_recognition_model_cnn.h5' # Make sure this path is correct
18
- try:
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):