Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def predict(img):
|
|
60 |
if img is None or not isinstance(img, dict) or 'image' not in img:
|
61 |
return {"Error": 1.0}
|
62 |
|
63 |
-
img_data = img['
|
64 |
img_gray = Image.fromarray(img_data).convert('L').resize((28, 28))
|
65 |
img_tensor = transforms.ToTensor()(img_gray).unsqueeze(0)
|
66 |
|
|
|
60 |
if img is None or not isinstance(img, dict) or 'image' not in img:
|
61 |
return {"Error": 1.0}
|
62 |
|
63 |
+
img_data = img['layers'][0]
|
64 |
img_gray = Image.fromarray(img_data).convert('L').resize((28, 28))
|
65 |
img_tensor = transforms.ToTensor()(img_gray).unsqueeze(0)
|
66 |
|