Ahsen Khaliq
commited on
Commit
•
cdd5108
1
Parent(s):
c33a1bf
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')['state_dict'])
|
23 |
|
24 |
# Set to eval mode and move to desired device
|
25 |
model = model.to(device)
|