Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
|
|
8 |
from transformers import Blip2Processor, Blip2ForConditionalGeneration, InstructBlipProcessor, InstructBlipForConditionalGeneration
|
9 |
|
10 |
|
11 |
-
def load_caption_model(blip2=
|
12 |
|
13 |
if blip2:
|
14 |
processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b", load_in_8bit=True,torch_dtype=torch.float16)
|
|
|
8 |
from transformers import Blip2Processor, Blip2ForConditionalGeneration, InstructBlipProcessor, InstructBlipForConditionalGeneration
|
9 |
|
10 |
|
11 |
+
def load_caption_model(blip2=False, instructblip=True):
|
12 |
|
13 |
if blip2:
|
14 |
processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b", load_in_8bit=True,torch_dtype=torch.float16)
|