tommy24 commited on
Commit
61fe446
·
1 Parent(s): a6cdf41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -354,7 +354,9 @@ def classify(platform, UserInput, Image, Textbox2, Textbox3):
354
  }
355
  if platform == "wh":
356
  get_image = requests.get(Image, headers=headers)
357
- imageData = cv.imdecode(np.asarray(bytearray(get_image.content), dtype="uint8"), cv.IMREAD_COLOR)
 
 
358
  elif platform == "web":
359
  print("WEB")
360
  # Handle web case if needed
 
354
  }
355
  if platform == "wh":
356
  get_image = requests.get(Image, headers=headers)
357
+ if get_image.status_code == 200:
358
+ print(get_image.content)
359
+ imageData = cv.imdecode(np.asarray(bytearray(get_image.content), dtype="uint8"), cv.IMREAD_COLOR)
360
  elif platform == "web":
361
  print("WEB")
362
  # Handle web case if needed