shadowlilac commited on
Commit
9e7fff8
1 Parent(s): 1b54784

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,7 +3,7 @@ from PIL import Image
3
  from transformers import AutoProcessor, BlipForConditionalGeneration
4
  import os
5
  processor = AutoProcessor.from_pretrained("shadowlilac/visor-v2", token=os.getenv('HUGGING_FACE_HUB_TOKEN'))
6
- model = BlipForConditionalGeneration.from_pretrained("shadowlilac/visor-v2", token=os.getenv('HUGGING_FACE_HUB_TOKEN'))
7
  model.config.vision_config.image_size=768
8
  model.config.vision_config.patch_size=28
9
  model.config.vision_config.projection_dim=768
 
3
  from transformers import AutoProcessor, BlipForConditionalGeneration
4
  import os
5
  processor = AutoProcessor.from_pretrained("shadowlilac/visor-v2", token=os.getenv('HUGGING_FACE_HUB_TOKEN'))
6
+ model = BlipForConditionalGeneration.from_pretrained("shadowlilac/visor-v2", ignore_mismatched_sizes=True, token=os.getenv('HUGGING_FACE_HUB_TOKEN'))
7
  model.config.vision_config.image_size=768
8
  model.config.vision_config.patch_size=28
9
  model.config.vision_config.projection_dim=768