Gaimundo commited on
Commit
5c706d5
·
verified ·
1 Parent(s): b07da2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -27,7 +27,8 @@ class MNISTNet(nn.Module):
27
  return x
28
 
29
  model = MNISTNet()
30
- model.load_state_dict(torch.hub.load_state_dict_from_url('https://huggingface.co/Gaimundo/mnist-nn/resolve/main/mnist_cnn.pt', map_location='cpu'))
 
31
  model.eval()
32
 
33
  transform = transforms.Compose([
 
27
  return x
28
 
29
  model = MNISTNet()
30
+ model_file = hf_hub_download(repo_id="Gaimundo/mnist-nn", filename="mnist_cnn.pt")
31
+ model.load_state_dict(torch.load(model_file, map_location="cpu"))
32
  model.eval()
33
 
34
  transform = transforms.Compose([