sowbaranika13 commited on
Commit
290de9c
·
verified ·
1 Parent(s): eba887e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -18,12 +18,14 @@ labels = {
18
 
19
 
20
  def preprocess_image(image_data):
 
21
  image = Image.open(BytesIO(image_data))
22
  img = image.resize((224, 224))
23
  img_array = img_to_array(img)
24
  img_array = np.expand_dims(img_array, axis=0)
25
  img_array = preprocess_input(img_array)
26
  print(tf.__version__)
 
27
  return img_array, img
28
 
29
  def predict(img):
 
18
 
19
 
20
  def preprocess_image(image_data):
21
+ print(type(image_data))
22
  image = Image.open(BytesIO(image_data))
23
  img = image.resize((224, 224))
24
  img_array = img_to_array(img)
25
  img_array = np.expand_dims(img_array, axis=0)
26
  img_array = preprocess_input(img_array)
27
  print(tf.__version__)
28
+
29
  return img_array, img
30
 
31
  def predict(img):