ciasimbaya commited on
Commit
2ab194b
·
1 Parent(s): f3f5757

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -46,7 +46,12 @@ def build_model(input_shape):
46
 
47
  output_layer = Conv2D(1, 1, padding="same", activation="sigmoid")(d4)
48
  model = Model(input_layer, output_layer, name="U-Net")
49
- model.load_weights('BreastCancerSegmentation.h5')
 
 
 
 
 
50
  return model
51
 
52
  def preprocess_image(image, size=128):
 
46
 
47
  output_layer = Conv2D(1, 1, padding="same", activation="sigmoid")(d4)
48
  model = Model(input_layer, output_layer, name="U-Net")
49
+ try:
50
+ model.load_weights('./BreastCancerSegmentation.h5')
51
+ except Exception as e:
52
+ print("Error al cargar los pesos del modelo:")
53
+ print(e)
54
+ exit(1)
55
  return model
56
 
57
  def preprocess_image(image, size=128):