titipata commited on
Commit
980e451
·
verified ·
1 Parent(s): c97d443

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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['image']
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