trissondon
commited on
Commit
•
fd05022
1
Parent(s):
a5e09b7
Updated app
Browse files
app.py
CHANGED
@@ -18,9 +18,8 @@ from datasets import load_dataset
|
|
18 |
from PIL import Image, ImageDraw, ImageFont
|
19 |
|
20 |
|
21 |
-
processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-
|
22 |
-
model = AutoModelForTokenClassification.from_pretrained("
|
23 |
-
|
24 |
|
25 |
|
26 |
# load image example
|
@@ -93,11 +92,6 @@ def process_image(image):
|
|
93 |
return image
|
94 |
|
95 |
|
96 |
-
def process_image_2(image):
|
97 |
-
pass
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
title = "Document Layout Detection v3"
|
102 |
description = "Using Layout_LM_v3 model for invoice information extraction"
|
103 |
|
|
|
18 |
from PIL import Image, ImageDraw, ImageFont
|
19 |
|
20 |
|
21 |
+
processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-large", apply_ocr=True)
|
22 |
+
model = AutoModelForTokenClassification.from_pretrained("microsoft/layoutlmv3-large")
|
|
|
23 |
|
24 |
|
25 |
# load image example
|
|
|
92 |
return image
|
93 |
|
94 |
|
|
|
|
|
|
|
|
|
|
|
95 |
title = "Document Layout Detection v3"
|
96 |
description = "Using Layout_LM_v3 model for invoice information extraction"
|
97 |
|