Commit
•
b3556a1
1
Parent(s):
76462db
Update clipGPT.py
Browse files- clipGPT.py +1 -2
clipGPT.py
CHANGED
@@ -158,8 +158,7 @@ def generate_caption_clipgpt(img):
|
|
158 |
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
159 |
|
160 |
start_time = time.time()
|
161 |
-
|
162 |
-
pil_image = PIL.Image.fromarray(image)
|
163 |
image = preprocess(pil_image).unsqueeze(0).to(device)
|
164 |
|
165 |
with torch.no_grad():
|
|
|
158 |
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
159 |
|
160 |
start_time = time.time()
|
161 |
+
|
|
|
162 |
image = preprocess(pil_image).unsqueeze(0).to(device)
|
163 |
|
164 |
with torch.no_grad():
|