Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -144,6 +144,8 @@ def get_caption(img,model_name):
|
|
144 |
model = model.eval()
|
145 |
model = model.to(device)
|
146 |
|
|
|
|
|
147 |
input = clip_processor(images=img, return_tensors="pt").to(device)
|
148 |
with torch.no_grad():
|
149 |
prefix = clip_model.get_image_features(**input)
|
|
|
144 |
model = model.eval()
|
145 |
model = model.to(device)
|
146 |
|
147 |
+
clip_model = clip_model.to(device)
|
148 |
+
|
149 |
input = clip_processor(images=img, return_tensors="pt").to(device)
|
150 |
with torch.no_grad():
|
151 |
prefix = clip_model.get_image_features(**input)
|