Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
from transformers import Blip2Processor, Blip2ForConditionalGeneration
|
5 |
|
6 |
|
7 |
-
def
|
8 |
|
9 |
processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
|
10 |
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", load_in_8bit=True,torch_dtype=torch.float16, device_map="auto")
|
|
|
4 |
from transformers import Blip2Processor, Blip2ForConditionalGeneration
|
5 |
|
6 |
|
7 |
+
def load_caption_model():
|
8 |
|
9 |
processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
|
10 |
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", load_in_8bit=True,torch_dtype=torch.float16, device_map="auto")
|