Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ build model
|
|
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 |
|
|
|
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", map_location="cpu")
|
24 |
model.load_state_dict(checkpoint["model"])
|
25 |
model.eval()
|
26 |
|