Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,9 +29,9 @@ model = AutoModelForTokenClassification.from_pretrained("jinhybr/OCR-LayoutLMv3"
|
|
29 |
|
30 |
# load image example
|
31 |
dataset = load_dataset("nielsr/funsd-layoutlmv3", split="test")
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
# define id2label, label2color
|
36 |
labels = dataset.features['ner_tags'].feature.names
|
37 |
id2label = {v: k for v, k in enumerate(labels)}
|
|
|
29 |
|
30 |
# load image example
|
31 |
dataset = load_dataset("nielsr/funsd-layoutlmv3", split="test")
|
32 |
+
Image.open(dataset[0]["image_path"]).convert("RGB").save("example_lm3.png")
|
33 |
+
|
34 |
+
|
35 |
# define id2label, label2color
|
36 |
labels = dataset.features['ner_tags'].feature.names
|
37 |
id2label = {v: k for v, k in enumerate(labels)}
|