Spaces:
Runtime error
Runtime error
Update example
Browse files
app.py
CHANGED
@@ -24,6 +24,7 @@ model = LayoutLMv2ForTokenClassification.from_pretrained("nielsr/layoutlmv2-fine
|
|
24 |
# load image example
|
25 |
dataset = load_dataset("nielsr/funsd", split="test")
|
26 |
image = Image.open(dataset[0]["image_path"]).convert("RGB")
|
|
|
27 |
image.save("document.png")
|
28 |
# define id2label, label2color
|
29 |
labels = dataset.features['ner_tags'].feature.names
|
|
|
24 |
# load image example
|
25 |
dataset = load_dataset("nielsr/funsd", split="test")
|
26 |
image = Image.open(dataset[0]["image_path"]).convert("RGB")
|
27 |
+
image = Image.open("./invoice.png")
|
28 |
image.save("document.png")
|
29 |
# define id2label, label2color
|
30 |
labels = dataset.features['ner_tags'].feature.names
|