BunkerMinecraft commited on
Commit
ae50682
·
verified ·
1 Parent(s): d3943ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -32,7 +32,11 @@ model = models.Sequential([
32
  ])
33
 
34
  # ---- Load trained weights ----
35
- model.load_weights("model.weights.h5")
 
 
 
 
36
 
37
  # ---- Preprocess image ----
38
  def preprocess(image: Image.Image):
 
32
  ])
33
 
34
  # ---- Load trained weights ----
35
+ if os.path.exists("model_weights.h5"):
36
+ model.load_weights("model_weights.h5")
37
+ print("Weights loaded successfully.")
38
+ else:
39
+ print("model_weights.h5 not found! Current directory:", os.listdir())
40
 
41
  # ---- Preprocess image ----
42
  def preprocess(image: Image.Image):