Update README.md

This commit is contained in:
Ankur Goyal 2022-09-08 05:36:51 +00:00 committed by huggingface-web
parent 3dc6de3168
commit 7743a4ee18
1 changed files with 2 additions and 5 deletions

View File

@ -26,7 +26,6 @@ tokenizer = AutoTokenizer.from_pretrained(
nlp = pipeline(
model="impira/layoutlm-document-qa",
tokenizer=tokenizer,
trust_remote_code=True,
)
nlp(
@ -48,14 +47,12 @@ nlp(
# {'score': 0.59147286, 'answer': '$ 3,750', 'start': 19, 'end': 20}
```
**NOTE**: This model was recently landed in transformers via [PR #18407](https://github.com/huggingface/transformers/pull/18407), so you'll need to use a recent version of transformers, for example:
**NOTE**: This model and pipeline was recently landed in transformers via [PR #18407](https://github.com/huggingface/transformers/pull/18407) and [PR #18414](https://github.com/huggingface/transformers/pull/18414), so you'll need to use a recent version of transformers, for example:
```bash
pip install git+https://github.com/huggingface/transformers.git@5c4c869014f5839d04c1fd28133045df0c91fd84
pip install git+https://github.com/huggingface/transformers.git@2ef774211733f0acf8d3415f9284c49ef219e991
```
The pipeline is currently in review ([PR #18414](https://github.com/huggingface/transformers/pull/18414)). In the meantime, you'll have to use the `trust_remote_code=True` flag to run it.
## About us
This model was created by the team at [Impira](https://www.impira.com/).