skuma11 commited on
Commit
8d17e1e
·
verified ·
1 Parent(s): c1d1ecf

fix app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ NEW_LABELS = ["paper", "cardboard", "other"]
31
 
32
  # Load best model
33
  net = LargeNet()
34
- net.load_state_dict(torch.load("net.pth"))
35
  net.eval()
36
 
37
  # Transform uploaded images
 
31
 
32
  # Load best model
33
  net = LargeNet()
34
+ net.load_state_dict(torch.load("net.pth", map_location=torch.device('cpu')))
35
  net.eval()
36
 
37
  # Transform uploaded images