Spaces:
Runtime error
Runtime error
Ammar-alhaj-ali
commited on
Commit
•
155e281
1
Parent(s):
a8358f8
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,13 @@ os.system('pip install -q pytesseract')
|
|
8 |
|
9 |
import gradio as gr
|
10 |
import numpy as np
|
11 |
-
|
12 |
from datasets import load_dataset
|
13 |
from PIL import Image, ImageDraw, ImageFont
|
14 |
|
15 |
-
|
16 |
-
|
|
|
17 |
|
18 |
# load image example
|
19 |
dataset = load_dataset("nielsr/funsd", split="test")
|
|
|
8 |
|
9 |
import gradio as gr
|
10 |
import numpy as np
|
11 |
+
|
12 |
from datasets import load_dataset
|
13 |
from PIL import Image, ImageDraw, ImageFont
|
14 |
|
15 |
+
from transformers import AutoProcessor, AutoModelForTokenClassification
|
16 |
+
processor = AutoProcessor.from_pretrained("Ammar-alhaj-ali/LayoutLMv3-Fine-Tuning-FUNSD")
|
17 |
+
model = AutoModelForTokenClassification.from_pretrained("Ammar-alhaj-ali/LayoutLMv3-Fine-Tuning-FUNSD")
|
18 |
|
19 |
# load image example
|
20 |
dataset = load_dataset("nielsr/funsd", split="test")
|