Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,10 @@ import os
|
|
12 |
|
13 |
DESCRIPTION = "# Image Captioning with LongCap"
|
14 |
|
15 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "
|
|
|
16 |
|
17 |
-
model_id = "unography/blip-long-cap
|
18 |
processor = AutoProcessor.from_pretrained(model_id)
|
19 |
model = BlipForConditionalGeneration.from_pretrained(model_id).to(device)
|
20 |
|
|
|
12 |
|
13 |
DESCRIPTION = "# Image Captioning with LongCap"
|
14 |
|
15 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "CPU")
|
16 |
+
print("Using device: ", device)
|
17 |
|
18 |
+
model_id = "unography/blip-long-cap"
|
19 |
processor = AutoProcessor.from_pretrained(model_id)
|
20 |
model = BlipForConditionalGeneration.from_pretrained(model_id).to(device)
|
21 |
|