How to use Yova/SmallCap7M 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="Yova/SmallCap7M")
# Load model directly from transformers import SmallCap model = SmallCap.from_pretrained("Yova/SmallCap7M", dtype="auto")
Hi,
When attempting to use this model in Transformers (version 4.31.0), the following error occurs:
ImportError: cannot import name 'SmallCap' from 'transformers' (/usr/local/lib/python3.10/dist-packages/transformers/init.py)
Thanks for your help on this
· Sign up or log in to comment