Update README.md
Browse files
README.md
CHANGED
|
@@ -16,16 +16,11 @@ This is a fine-tuned version of the multi-modal [LayoutLM](https://aka.ms/layout
|
|
| 16 |
To run these examples, you must have [PIL](https://pillow.readthedocs.io/en/stable/installation.html), [pytesseract](https://pypi.org/project/pytesseract/), and [PyTorch](https://pytorch.org/get-started/locally/) installed in addition to [transformers](https://huggingface.co/docs/transformers/index).
|
| 17 |
|
| 18 |
```python
|
| 19 |
-
from transformers import
|
| 20 |
-
|
| 21 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 22 |
-
"impira/layoutlm-document-qa",
|
| 23 |
-
add_prefix_space=True,
|
| 24 |
-
)
|
| 25 |
|
| 26 |
nlp = pipeline(
|
|
|
|
| 27 |
model="impira/layoutlm-document-qa",
|
| 28 |
-
tokenizer=tokenizer,
|
| 29 |
)
|
| 30 |
|
| 31 |
nlp(
|
|
|
|
| 16 |
To run these examples, you must have [PIL](https://pillow.readthedocs.io/en/stable/installation.html), [pytesseract](https://pypi.org/project/pytesseract/), and [PyTorch](https://pytorch.org/get-started/locally/) installed in addition to [transformers](https://huggingface.co/docs/transformers/index).
|
| 17 |
|
| 18 |
```python
|
| 19 |
+
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
nlp = pipeline(
|
| 22 |
+
"document-question-answering",
|
| 23 |
model="impira/layoutlm-document-qa",
|
|
|
|
| 24 |
)
|
| 25 |
|
| 26 |
nlp(
|