Instructions to use welabbar/florence2_bj_cc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use welabbar/florence2_bj_cc 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="welabbar/florence2_bj_cc", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("welabbar/florence2_bj_cc", trust_remote_code=True) model = AutoModelForImageTextToText.from_pretrained("welabbar/florence2_bj_cc", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Update preprocessor_config.json
Browse files- preprocessor_config.json +4 -4
preprocessor_config.json
CHANGED
|
@@ -29,11 +29,11 @@
|
|
| 29 |
"processor_class": "Florence2Processor",
|
| 30 |
"resample": 3,
|
| 31 |
"size": {
|
| 32 |
-
"height":
|
| 33 |
-
"width":
|
| 34 |
},
|
| 35 |
"crop_size": {
|
| 36 |
-
"height":
|
| 37 |
-
"width":
|
| 38 |
}
|
| 39 |
}
|
|
|
|
| 29 |
"processor_class": "Florence2Processor",
|
| 30 |
"resample": 3,
|
| 31 |
"size": {
|
| 32 |
+
"height": 768,
|
| 33 |
+
"width":768
|
| 34 |
},
|
| 35 |
"crop_size": {
|
| 36 |
+
"height": 768,
|
| 37 |
+
"width": 768
|
| 38 |
}
|
| 39 |
}
|