Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ blip_model = BlipForConditionalGeneration.from_pretrained("jaimin/Imagecap")
|
|
| 15 |
|
| 16 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 17 |
git_model.to(device)
|
| 18 |
-
|
| 19 |
|
| 20 |
def generate_caption(processor, model, image, use_float_16=False):
|
| 21 |
inputs = processor(images=image, return_tensors="pt").to(device)
|
|
|
|
| 15 |
|
| 16 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 17 |
git_model.to(device)
|
| 18 |
+
blip_model.to(device)
|
| 19 |
|
| 20 |
def generate_caption(processor, model, image, use_float_16=False):
|
| 21 |
inputs = processor(images=image, return_tensors="pt").to(device)
|