jerilseb commited on
Commit
54f8640
1 Parent(s): b567097

update stuff

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -31,9 +31,11 @@ state_dict = torch.load('model.pth', map_location='cpu')
31
  model.load_state_dict(state_dict, strict=False)
32
  model.eval()
33
 
34
- def predict(im):
35
- im = im['background']
36
- print(im)
 
 
37
  x = torch.tensor(im, dtype=torch.float32).unsqueeze(0).unsqueeze(0) / 255.
38
 
39
  with torch.no_grad():
 
31
  model.load_state_dict(state_dict, strict=False)
32
  model.eval()
33
 
34
+ def predict(image):
35
+ image = image['composite']
36
+ image = transforms.Resize((28, 28))(image)
37
+ print(image)
38
+
39
  x = torch.tensor(im, dtype=torch.float32).unsqueeze(0).unsqueeze(0) / 255.
40
 
41
  with torch.no_grad():