Elegbede commited on
Commit
0390bc8
1 Parent(s): 5d729a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ import io
8
  def predict_input_image(img):
9
  # Normalize the image by cropping (center crop)
10
  img = Image.open(io.BytesIO(img))
11
- h, w = img.size
12
  crop_start_x = (w - 224) // 2
13
  crop_start_y = (h - 224) // 2
14
  img = img.crop((crop_start_x, crop_start_y, crop_start_x + 224, crop_start_y + 224))
 
8
  def predict_input_image(img):
9
  # Normalize the image by cropping (center crop)
10
  img = Image.open(io.BytesIO(img))
11
+ h, w,_ = img.size
12
  crop_start_x = (w - 224) // 2
13
  crop_start_y = (h - 224) // 2
14
  img = img.crop((crop_start_x, crop_start_y, crop_start_x + 224, crop_start_y + 224))