NicoZenith commited on
Commit
010cd6a
1 Parent(s): 813cb73

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -35,4 +35,6 @@ raw_image = Image.open(requests.get(image_file, stream=True).raw)
35
  inputs = processor(images=raw_image, text=prompt, return_tensors='pt').to(0, torch.float16)
36
 
37
  output = model.generate(**inputs, max_new_tokens=200, do_sample=False)
38
- print(processor.decode(output[0][2:], skip_special_tokens=True))
 
 
 
35
  inputs = processor(images=raw_image, text=prompt, return_tensors='pt').to(0, torch.float16)
36
 
37
  output = model.generate(**inputs, max_new_tokens=200, do_sample=False)
38
+ response_text = processor.decode(output[0][2:], skip_special_tokens=True)
39
+ response_text = response_text.split("assistant\n")[-1]
40
+ print(response_text)