Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
|