Franco Astegiano commited on
Commit
c05e944
1 Parent(s): fb1dd41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -88,8 +88,8 @@ def load_image(image, image_size=(256, 256), preserve_aspect_ratio=True):
88
  #image_path = tf.keras.utils.get_file(os.path.basename(image_url)[-128:], image_url)
89
  # Load and convert to float32 numpy array, add batch dimension, and normalize to range [0, 1].
90
  #img = tf.io.decode_image(
91
- tf.io.read_file(image_path),
92
- channels=3, dtype=tf.float32)[tf.newaxis, ...]
93
  img = crop_center(image)
94
  img = tf.image.resize(img, image_size, preserve_aspect_ratio=True)
95
  return img
 
88
  #image_path = tf.keras.utils.get_file(os.path.basename(image_url)[-128:], image_url)
89
  # Load and convert to float32 numpy array, add batch dimension, and normalize to range [0, 1].
90
  #img = tf.io.decode_image(
91
+ # tf.io.read_file(image_path),
92
+ #channels=3, dtype=tf.float32)[tf.newaxis, ...]
93
  img = crop_center(image)
94
  img = tf.image.resize(img, image_size, preserve_aspect_ratio=True)
95
  return img