Update handler.py
Browse files- handler.py +3 -3
handler.py
CHANGED
|
@@ -45,10 +45,10 @@ class EndpointHandler():
|
|
| 45 |
|
| 46 |
try:
|
| 47 |
#url image
|
| 48 |
-
data=urlopen(image_path).read()
|
| 49 |
-
image = Image.open(BytesIO(data))
|
| 50 |
#bytes image
|
| 51 |
-
|
| 52 |
predictions = self.predict_objects(image)
|
| 53 |
return {
|
| 54 |
"statusCode": 200,
|
|
|
|
| 45 |
|
| 46 |
try:
|
| 47 |
#url image
|
| 48 |
+
#data=urlopen(image_path).read()
|
| 49 |
+
#image = Image.open(BytesIO(data))
|
| 50 |
#bytes image
|
| 51 |
+
image=image_path
|
| 52 |
predictions = self.predict_objects(image)
|
| 53 |
return {
|
| 54 |
"statusCode": 200,
|