Update README.md
Browse files
README.md
CHANGED
|
@@ -34,23 +34,23 @@ from transformers import pipeline
|
|
| 34 |
|
| 35 |
nlp = pipeline(
|
| 36 |
"document-question-answering",
|
| 37 |
-
model="
|
| 38 |
)
|
| 39 |
|
| 40 |
nlp(
|
| 41 |
-
"https://
|
| 42 |
"What is the invoice number?"
|
| 43 |
)
|
| 44 |
# {'score': 0.9943977, 'answer': 'us-001', 'start': 15, 'end': 15}
|
| 45 |
|
| 46 |
nlp(
|
| 47 |
-
"https://
|
| 48 |
"What is the purchase amount?"
|
| 49 |
)
|
| 50 |
# {'score': 0.9912159, 'answer': '$1,000,000,000', 'start': 97, 'end': 97}
|
| 51 |
|
| 52 |
nlp(
|
| 53 |
-
"https://
|
| 54 |
"What are the 2020 net sales?"
|
| 55 |
)
|
| 56 |
# {'score': 0.59147286, 'answer': '$ 3,750', 'start': 19, 'end': 20}
|
|
|
|
| 34 |
|
| 35 |
nlp = pipeline(
|
| 36 |
"document-question-answering",
|
| 37 |
+
model="impira/layoutlm-document-qa",
|
| 38 |
)
|
| 39 |
|
| 40 |
nlp(
|
| 41 |
+
"https://templates.invoicehome.com/invoice-template-us-neat-750px.png",
|
| 42 |
"What is the invoice number?"
|
| 43 |
)
|
| 44 |
# {'score': 0.9943977, 'answer': 'us-001', 'start': 15, 'end': 15}
|
| 45 |
|
| 46 |
nlp(
|
| 47 |
+
"https://miro.medium.com/max/787/1*iECQRIiOGTmEFLdWkVIH2g.jpeg",
|
| 48 |
"What is the purchase amount?"
|
| 49 |
)
|
| 50 |
# {'score': 0.9912159, 'answer': '$1,000,000,000', 'start': 97, 'end': 97}
|
| 51 |
|
| 52 |
nlp(
|
| 53 |
+
"https://www.accountingcoach.com/wp-content/uploads/2013/10/income-statement-example@2x.png",
|
| 54 |
"What are the 2020 net sales?"
|
| 55 |
)
|
| 56 |
# {'score': 0.59147286, 'answer': '$ 3,750', 'start': 19, 'end': 20}
|