Jyothirmai
commited on
Commit
•
8b9889c
1
Parent(s):
e6a32cf
Update vitGPT.py
Browse files
vitGPT.py
CHANGED
@@ -316,7 +316,7 @@ print(model)
|
|
316 |
model.eval() # Set the model to evaluation mode
|
317 |
|
318 |
|
319 |
-
def generate_caption(image,max_tokens
|
320 |
tokenizer = GPT2TokenizerFast.from_pretrained('gpt2')
|
321 |
tokenizer.pad_token = tokenizer.eos_token
|
322 |
|
|
|
316 |
model.eval() # Set the model to evaluation mode
|
317 |
|
318 |
|
319 |
+
def generate_caption(image,max_tokens,temperature,deterministic=True):
|
320 |
tokenizer = GPT2TokenizerFast.from_pretrained('gpt2')
|
321 |
tokenizer.pad_token = tokenizer.eos_token
|
322 |
|