Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

paragon-AI
/
blip2-image-to-text

Image-to-Text
Transformers
English
blip-2
visual-question-answering
vision
image-captioning
Model card Files Files and versions
xet
Community
4

Instructions to use paragon-AI/blip2-image-to-text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use paragon-AI/blip2-image-to-text 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="paragon-AI/blip2-image-to-text")
    # Load model directly
    from transformers import AutoProcessor, AutoModelForVisualQuestionAnswering
    
    processor = AutoProcessor.from_pretrained("paragon-AI/blip2-image-to-text")
    model = AutoModelForVisualQuestionAnswering.from_pretrained("paragon-AI/blip2-image-to-text")
  • Notebooks
  • Google Colab
  • Kaggle
blip2-image-to-text
17.1 kB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 11 commits
thoth-AI's picture
thoth-AI
Updated handler.py
b1e4650 almost 3 years ago
  • .gitattributes
    1.52 kB
    initial commit almost 3 years ago
  • README.md
    6.61 kB
    First push of custom handler for Blip2 model to be used in Inference API almost 3 years ago
  • config.json
    6.96 kB
    First push of custom handler for Blip2 model to be used in Inference API almost 3 years ago
  • handler.py
    1.54 kB
    Updated handler.py almost 3 years ago
  • preprocessor_config.json
    432 Bytes
    First push of custom handler for Blip2 model to be used in Inference API almost 3 years ago