Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,12 +21,12 @@ os.system("pip install -q pytesseract")
|
|
21 |
|
22 |
import gradio as gr
|
23 |
import numpy as np
|
24 |
-
from transformers import LayoutLMv3Processor,
|
25 |
from datasets import load_dataset
|
26 |
from PIL import Image, ImageDraw, ImageFont
|
27 |
|
28 |
-
processor =
|
29 |
-
model =
|
30 |
"jinhybr/LiLt-funsd-en"
|
31 |
)
|
32 |
|
|
|
21 |
|
22 |
import gradio as gr
|
23 |
import numpy as np
|
24 |
+
from transformers import LayoutLMv3Processor, LiltForTokenClassification
|
25 |
from datasets import load_dataset
|
26 |
from PIL import Image, ImageDraw, ImageFont
|
27 |
|
28 |
+
processor = LiltForTokenClassification.from_pretrained("SCUT-DLVCLab/lilt-roberta-en-base")
|
29 |
+
model = LayoutLMv3Processor.from_pretrained(
|
30 |
"jinhybr/LiLt-funsd-en"
|
31 |
)
|
32 |
|