Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
|
|
18 |
transform = transforms.Compose([transforms.Resize((image_size, image_size)),transforms.ToTensor(),normalize])
|
19 |
|
20 |
#######Tag2Text Model
|
21 |
-
pretrained = '
|
22 |
|
23 |
model_tag2text = tag2text_caption(pretrained=pretrained, image_size=image_size, vit='swin_b' )
|
24 |
|
@@ -26,8 +26,8 @@ model_tag2text.eval()
|
|
26 |
model_tag2text = model_tag2text.to(device)
|
27 |
|
28 |
|
29 |
-
#######
|
30 |
-
pretrained = '
|
31 |
|
32 |
model_ram = ram(pretrained=pretrained, image_size=image_size, vit='swin_l' )
|
33 |
|
|
|
18 |
transform = transforms.Compose([transforms.Resize((image_size, image_size)),transforms.ToTensor(),normalize])
|
19 |
|
20 |
#######Tag2Text Model
|
21 |
+
pretrained = 'tag2text_swin_14m.pth'
|
22 |
|
23 |
model_tag2text = tag2text_caption(pretrained=pretrained, image_size=image_size, vit='swin_b' )
|
24 |
|
|
|
26 |
model_tag2text = model_tag2text.to(device)
|
27 |
|
28 |
|
29 |
+
#######RAM Model
|
30 |
+
pretrained = 'ram_swin_large_14m.pth'
|
31 |
|
32 |
model_ram = ram(pretrained=pretrained, image_size=image_size, vit='swin_l' )
|
33 |
|