Instructions to use KennethTM/pix2struct-base-table2html with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KennethTM/pix2struct-base-table2html 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="KennethTM/pix2struct-base-table2html")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("KennethTM/pix2struct-base-table2html") model = AutoModelForImageTextToText.from_pretrained("KennethTM/pix2struct-base-table2html") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -24,7 +24,7 @@ Try the [demo app]() which contains both table detection and recognition!
|
|
| 24 |
|
| 25 |
This model takes an image of a table and outputs HTML - the model parses the image and performs optical character recognition (OCR) and structure recognition to HTML format.
|
| 26 |
|
| 27 |
-
The model expects an image containing only a table. If the table is embedded in a document, first use a table detection model to extract it.
|
| 28 |
|
| 29 |
The model is finetuned from [Pix2Struct base model](https://huggingface.co/google/pix2struct-base) using a max_patch_length of 1024 and max generation length of 1024. The max_patch_length should likely not be changed for inference but the generation length can be changed.
|
| 30 |
|
|
|
|
| 24 |
|
| 25 |
This model takes an image of a table and outputs HTML - the model parses the image and performs optical character recognition (OCR) and structure recognition to HTML format.
|
| 26 |
|
| 27 |
+
The model expects an image containing only a table. If the table is embedded in a document, first use a table detection model to extract it (e.g. [Microsoft's Table Transformer model](https://huggingface.co/microsoft/table-transformer-detection)).
|
| 28 |
|
| 29 |
The model is finetuned from [Pix2Struct base model](https://huggingface.co/google/pix2struct-base) using a max_patch_length of 1024 and max generation length of 1024. The max_patch_length should likely not be changed for inference but the generation length can be changed.
|
| 30 |
|