Instructions to use microsoft/trocr-base-handwritten with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/trocr-base-handwritten 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="microsoft/trocr-base-handwritten")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("microsoft/trocr-base-handwritten") model = AutoModelForImageTextToText.from_pretrained("microsoft/trocr-base-handwritten") - Notebooks
- Google Colab
- Kaggle
Update preprocessor_config.json
Browse files- preprocessor_config.json +1 -1
preprocessor_config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"do_normalize": true,
|
| 3 |
"do_resize": true,
|
| 4 |
-
"image_processor_type": "
|
| 5 |
"image_mean": [
|
| 6 |
0.5,
|
| 7 |
0.5,
|
|
|
|
| 1 |
{
|
| 2 |
"do_normalize": true,
|
| 3 |
"do_resize": true,
|
| 4 |
+
"image_processor_type": "ViTImageProcessor",
|
| 5 |
"image_mean": [
|
| 6 |
0.5,
|
| 7 |
0.5,
|