Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,21 +29,6 @@ model.eval()
|
|
29 |
model = model.to(device)
|
30 |
|
31 |
|
32 |
-
from models.blip_vqa import blip_vqa
|
33 |
-
|
34 |
-
image_size_vq = 480
|
35 |
-
transform_vq = transforms.Compose([
|
36 |
-
transforms.Resize((image_size_vq,image_size_vq),interpolation=InterpolationMode.BICUBIC),
|
37 |
-
transforms.ToTensor(),
|
38 |
-
transforms.Normalize((0.48145466, 0.4578275, 0.40821073), (0.26862954, 0.26130258, 0.27577711))
|
39 |
-
])
|
40 |
-
|
41 |
-
model_url_vq = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model*_vqa.pth'
|
42 |
-
|
43 |
-
model_vq = blip_vqa(pretrained=model_url_vq, image_size=480, vit='base')
|
44 |
-
model_vq.eval()
|
45 |
-
model_vq = model_vq.to(device)
|
46 |
-
|
47 |
def getModelPath(language):
|
48 |
if language == 'English':
|
49 |
path = None
|
|
|
29 |
model = model.to(device)
|
30 |
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
def getModelPath(language):
|
33 |
if language == 'English':
|
34 |
path = None
|