veronhii commited on
Commit
5dc2040
·
1 Parent(s): fc466bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -10,7 +10,9 @@ with open("classlabel.txt", 'r') as file:
10
  CLASS_LABEL = [x.strip() for x in file.readlines()]
11
 
12
  def normalize_image(img):
13
- img = tf.cast(img, tf.float32) / 255.
 
 
14
  img = tf.image.resize(img, (IMG_HEIGHT, IMG_WIDTH), method='bilinear')
15
  return img
16
 
 
10
  CLASS_LABEL = [x.strip() for x in file.readlines()]
11
 
12
  def normalize_image(img):
13
+ img = tf.image.random_flip_left_right(img)
14
+ img = tf.image.random_rotation(img, 30)
15
+ img = tf.cast(img, tf.float32) / 255.0
16
  img = tf.image.resize(img, (IMG_HEIGHT, IMG_WIDTH), method='bilinear')
17
  return img
18