Instructions to use damerajee/GPT-Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use damerajee/GPT-Vision with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import GPTVision model = GPTVision.from_pretrained("damerajee/GPT-Vision", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_gpt2vision.py
Browse files- modeling_gpt2vision.py +2 -0
modeling_gpt2vision.py
CHANGED
|
@@ -59,7 +59,9 @@ class GPT2Vision(PreTrainedModel):
|
|
| 59 |
images = batch['image']
|
| 60 |
if isinstance(text, str):
|
| 61 |
text = [text]
|
|
|
|
| 62 |
text_inputs = self.tokenizer(
|
|
|
|
| 63 |
text,
|
| 64 |
padding='max_length',
|
| 65 |
truncation=True,
|
|
|
|
| 59 |
images = batch['image']
|
| 60 |
if isinstance(text, str):
|
| 61 |
text = [text]
|
| 62 |
+
print("text",text)
|
| 63 |
text_inputs = self.tokenizer(
|
| 64 |
+
|
| 65 |
text,
|
| 66 |
padding='max_length',
|
| 67 |
truncation=True,
|