Ahsen Khaliq
commited on
Commit
•
0827ac1
1
Parent(s):
e2c44d5
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ os.system("wget https://huggingface.co/akhaliq/Omnivore/resolve/main/swinB_check
|
|
19 |
# Pick a pretrained model
|
20 |
model_name = "omnivore_swinB"
|
21 |
model = torch.hub.load('facebookresearch/omnivore:main', "omnivore_swinB", pretrained=False)
|
22 |
-
model.load_state_dict(torch.load('/home/user/app/swinB_checkpoint.torch')['
|
23 |
|
24 |
# Set to eval mode and move to desired device
|
25 |
model = model.to(device)
|
|
|
19 |
# Pick a pretrained model
|
20 |
model_name = "omnivore_swinB"
|
21 |
model = torch.hub.load('facebookresearch/omnivore:main', "omnivore_swinB", pretrained=False)
|
22 |
+
model.load_state_dict(torch.load('/home/user/app/swinB_checkpoint.torch')['trunk'])
|
23 |
|
24 |
# Set to eval mode and move to desired device
|
25 |
model = model.to(device)
|