Instructions to use Salesforce/blip-vqa-capfilt-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Salesforce/blip-vqa-capfilt-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("visual-question-answering", model="Salesforce/blip-vqa-capfilt-large")# Load model directly from transformers import AutoProcessor, AutoModelForVisualQuestionAnswering processor = AutoProcessor.from_pretrained("Salesforce/blip-vqa-capfilt-large") model = AutoModelForVisualQuestionAnswering.from_pretrained("Salesforce/blip-vqa-capfilt-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Fix error in model name
#9
by malformed369 - opened
README.md
CHANGED
|
@@ -38,8 +38,8 @@ import requests
|
|
| 38 |
from PIL import Image
|
| 39 |
from transformers import BlipProcessor, BlipForQuestionAnswering
|
| 40 |
|
| 41 |
-
processor = BlipProcessor.from_pretrained("Salesforce/blip-vqa-capfilt-large
|
| 42 |
-
model = BlipForQuestionAnswering.from_pretrained("Salesforce/blip-vqa-capfilt-large
|
| 43 |
|
| 44 |
img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
|
| 45 |
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
|
|
|
|
| 38 |
from PIL import Image
|
| 39 |
from transformers import BlipProcessor, BlipForQuestionAnswering
|
| 40 |
|
| 41 |
+
processor = BlipProcessor.from_pretrained("Salesforce/blip-vqa-capfilt-large")
|
| 42 |
+
model = BlipForQuestionAnswering.from_pretrained("Salesforce/blip-vqa-capfilt-large")
|
| 43 |
|
| 44 |
img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
|
| 45 |
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
|