breynolds1247 commited on
Commit
4f449fa
1 Parent(s): 4fd82b8

Update helper_functions.py

Browse files
Files changed (1) hide show
  1. helper_functions.py +1 -14
helper_functions.py CHANGED
@@ -18,21 +18,8 @@ def img_scaler(image, max_dim = 512):
18
  def load_img(image_path, content=True, max_dim = 512):
19
 
20
  if content:
 
21
  img = image_path
22
- print("image_path:")
23
- print(image_path)
24
- #Read contents of the input filename
25
- ####img = tf.keras.preprocessing.image.array_to_img(image_path)
26
- print("img")
27
- print(img)
28
- #img = tf.io.read_file(image_path)
29
- #print(img)
30
-
31
-
32
- #Detect whether an image is a BMP, GIF, JPEG, or PNG,
33
- #performs the appropriate operation
34
- #convert the input bytes string into a Tensor of type dtype
35
- ##img = tf.image.decode_image(img, channels=3)
36
 
37
  #Convert image to dtype
38
  img = tf.image.convert_image_dtype(img, tf.float32)
 
18
  def load_img(image_path, content=True, max_dim = 512):
19
 
20
  if content:
21
+ #content images come straight from the web app, so no opening or decoding
22
  img = image_path
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
  #Convert image to dtype
25
  img = tf.image.convert_image_dtype(img, tf.float32)