Aumkeshchy2003 commited on
Commit
808c348
·
verified ·
1 Parent(s): 1396142

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -190,8 +190,8 @@ class ViT(nn.Module):
190
 
191
 
192
  # Load model weights
193
- model = ViT(cfg).to(device)
194
- model.load_state_dict(torch.load("best_ViT_CIFAR100_baseline_checkpoint.pth", map_location=device))
195
  model.eval()
196
 
197
  # Image preprocessing
 
190
 
191
 
192
  # Load model weights
193
+ checkpoint = torch.load("best_ViT_CIFAR100_baseline_checkpoint.pth", map_location=device)
194
+ model.load_state_dict(checkpoint["model_state"])
195
  model.eval()
196
 
197
  # Image preprocessing