datasetsANDmodels commited on
Commit
b6654e7
·
verified ·
1 Parent(s): 91adf89

Update usage.py

Browse files
Files changed (1) hide show
  1. usage.py +1 -2
usage.py CHANGED
@@ -4,8 +4,7 @@ from transformers import BlipProcessor, BlipForConditionalGeneration
4
 
5
  # Load the BLIP model and processor
6
  processor = BlipProcessor.from_pretrained("image2text")
7
- model = BlipForConditionalGeneration.from_pretrained('image2text')
8
-
9
  # Load the image you want to describe
10
  image_path = sys.argv[1]
11
  raw_image = Image.open(image_path).convert('RGB')
 
4
 
5
  # Load the BLIP model and processor
6
  processor = BlipProcessor.from_pretrained("image2text")
7
+ model = BlipForConditionalGeneration.from_pretrained('image2text' , use_safetensors=True)
 
8
  # Load the image you want to describe
9
  image_path = sys.argv[1]
10
  raw_image = Image.open(image_path).convert('RGB')