A7md47 commited on
Commit
dc805ed
Β·
verified Β·
1 Parent(s): 3375674

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -52,11 +52,8 @@ def load_model():
52
 
53
  # ── Prediction ─────────────────────────────
54
  def predict(model, class_indices, img, input_shape):
55
- # Use model's expected input size
56
- if input_shape and len(input_shape) >= 3:
57
- target_size = (input_shape[1], input_shape[2]) # (height, width)
58
- else:
59
- target_size = (160, 160) # fallback
60
 
61
  img = img.convert("RGB").resize(target_size)
62
  arr = np.array(img, dtype=np.float32) / 255.0
 
52
 
53
  # ── Prediction ─────────────────────────────
54
  def predict(model, class_indices, img, input_shape):
55
+
56
+ target_size = (160, 160) # fallback
 
 
 
57
 
58
  img = img.convert("RGB").resize(target_size)
59
  arr = np.array(img, dtype=np.float32) / 255.0