m7mdal7aj commited on
Commit
e4e3f5d
1 Parent(s): dfda773

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,8 +10,8 @@ from transformers import Blip2Processor, Blip2ForConditionalGeneration
10
  def load_caption_model():
11
 
12
  processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
13
- model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", load_in_8bit=True,torch_dtype=torch.float16, device_map="auto")
14
-
15
  return model, processor
16
 
17
 
 
10
  def load_caption_model():
11
 
12
  processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
13
+ #model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", load_in_8bit=True,torch_dtype=torch.float16, device_map="auto")
14
+ model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", torch_dtype=torch.float16, device_map="auto")
15
  return model, processor
16
 
17