Mohammadreza
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -58,7 +58,7 @@ raw_image = Image.open(requests.get(image_file, stream=True).raw)
|
|
58 |
|
59 |
inputs = processor(images=raw_image, text=prompt, return_tensors='pt').to(0, torch.float16)
|
60 |
|
61 |
-
output = model.generate(**inputs, max_new_tokens=
|
62 |
generated_title = processor.decode(output[0], skip_special_tokens=True)[len(text.replace('<image>', ' ')):]
|
63 |
output = generated_title.replace('ASSISTANT: ', '')
|
64 |
json_output = json.loads(output)
|
|
|
58 |
|
59 |
inputs = processor(images=raw_image, text=prompt, return_tensors='pt').to(0, torch.float16)
|
60 |
|
61 |
+
output = model.generate(**inputs, max_new_tokens=384, do_sample=False)
|
62 |
generated_title = processor.decode(output[0], skip_special_tokens=True)[len(text.replace('<image>', ' ')):]
|
63 |
output = generated_title.replace('ASSISTANT: ', '')
|
64 |
json_output = json.loads(output)
|