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