fancyfeast commited on
Commit
72ed04a
·
1 Parent(s): 54451e1
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -30,7 +30,8 @@ def prepare_image(image: Image.Image, target_size: int):
30
  padded_image = padded_image.resize((target_size, target_size), Image.BICUBIC)
31
 
32
  # Convert to numpy array
33
- image_array = np.asarray(padded_image, dtype=np.float32) / 255.0
 
34
  return np.expand_dims(image_array, axis=0)
35
 
36
 
 
30
  padded_image = padded_image.resize((target_size, target_size), Image.BICUBIC)
31
 
32
  # Convert to numpy array
33
+ # Based on the ONNX graph, the model appears to expect inputs in the range of 0-255
34
+ image_array = np.asarray(padded_image, dtype=np.float32)
35
  return np.expand_dims(image_array, axis=0)
36
 
37