titipata commited on
Commit
bde1518
·
verified ·
1 Parent(s): dd8b406

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -56,7 +56,8 @@ def predict(img):
56
  if img is None:
57
  return None
58
 
59
- img_gray = Image.fromarray(img).convert('L').resize((28, 28))
 
60
  img_tensor = transforms.ToTensor()(img_gray).unsqueeze(0)
61
 
62
  # Make prediction
 
56
  if img is None:
57
  return None
58
 
59
+ img_data = img['image']
60
+ img_gray = Image.fromarray(img_data).convert('L').resize((28, 28))
61
  img_tensor = transforms.ToTensor()(img_gray).unsqueeze(0)
62
 
63
  # Make prediction