Convert output image to PIL
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ def predict_image(img, threshold):
|
|
54 |
)
|
55 |
|
56 |
json_data = json.loads(response.content)
|
57 |
-
pil_img = json_data['image']
|
58 |
shape = json_data['shape']
|
59 |
infos = json_data['infos']
|
60 |
duration = json_data['duration']
|
|
|
54 |
)
|
55 |
|
56 |
json_data = json.loads(response.content)
|
57 |
+
pil_img = Image.fromarray(json_data['image'])
|
58 |
shape = json_data['shape']
|
59 |
infos = json_data['infos']
|
60 |
duration = json_data['duration']
|