jw2yang commited on
Commit
a58e064
1 Parent(s): 7d013ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -18,8 +18,9 @@ labels = response.text.split("\n")
18
  build model
19
  '''
20
  model = FocalNet(depths=[12], patch_size=16, embed_dim=768, focal_levels=[3], use_layerscale=True, use_postln=True)
21
- url = 'https://projects4jw.blob.core.windows.net/focalnet/release/classification/focalnet_base_iso_16.pth'
22
- checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True)
 
23
  model.load_state_dict(checkpoint["model"])
24
  model.eval()
25
 
 
18
  build model
19
  '''
20
  model = FocalNet(depths=[12], patch_size=16, embed_dim=768, focal_levels=[3], use_layerscale=True, use_postln=True)
21
+ # url = 'https://projects4jw.blob.core.windows.net/focalnet/release/classification/focalnet_base_iso_16.pth'
22
+ # checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True)
23
+ checkpoint = torch.load("./focalnet_base_iso_16.pth")
24
  model.load_state_dict(checkpoint["model"])
25
  model.eval()
26