Instructions to use Salesforce/blip-image-captioning-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Salesforce/blip-image-captioning-base with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Salesforce/blip-image-captioning-base") model = AutoModelForMultimodalLM.from_pretrained("Salesforce/blip-image-captioning-base") - Notebooks
- Google Colab
- Kaggle
Input for calling predictor.predict() on Sagemaker
#19
by Callam - opened
Hi would like to call predictor.predict() on Sagemaker but I haven't been able to figure out or find how the input should be structured. Is there anyone who could provide me with an example?
+1 I am also looking for the same
did anyone find a solution for this ?
Yo I never found an answer to the simple solution of just calling predict() out of the box but I did get it working by writing my own inference.py. Feel free to use this notebook as is or as an example.
Thanks bro.