tommy24 commited on
Commit
b636cfd
·
1 Parent(s): fd219e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -353,14 +353,14 @@ def classify(platform, UserInput, Image, Textbox2, Textbox3):
353
  }
354
  if platform == "wh":
355
  get_image = requests.get(Image, headers=headers)
356
- image_data = cv.imdecode(np.asarray(bytearray(get_image.content), dtype="uint8"), cv.IMREAD_COLOR)
357
  elif platform == "web":
358
  print("WEB")
359
  # Handle web case if needed
360
  else:
361
  pass
362
 
363
- image_data = cv.resize(image_data, (224, 224))
364
  normalized_image_array = (image_data.astype(np.float32) / 127.0) - 1
365
  data[0] = normalized_image_array
366
 
 
353
  }
354
  if platform == "wh":
355
  get_image = requests.get(Image, headers=headers)
356
+ imageData = cv.imdecode(np.asarray(bytearray(get_image.content), dtype="uint8"), cv.IMREAD_COLOR)
357
  elif platform == "web":
358
  print("WEB")
359
  # Handle web case if needed
360
  else:
361
  pass
362
 
363
+ image_data = cv.resize(imageData, (224, 224))
364
  normalized_image_array = (image_data.astype(np.float32) / 127.0) - 1
365
  data[0] = normalized_image_array
366