Drazcat-AI commited on
Commit
6df2b8f
·
verified ·
1 Parent(s): bb65e1d

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -1
handler.py CHANGED
@@ -43,7 +43,8 @@ class EndpointHandler():
43
  image_path = event["inputs"]
44
 
45
  try:
46
- image = Image.Image()._new(Image.open(BytesIO(urlopen(image_path).read())))
 
47
  predictions = self.predict_objects(image)
48
  return {
49
  "statusCode": 200,
 
43
  image_path = event["inputs"]
44
 
45
  try:
46
+ data=urlopen(image_path).read()
47
+ image = Image.Image()._new(Image.open(BytesIO(data)))
48
  predictions = self.predict_objects(image)
49
  return {
50
  "statusCode": 200,