Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ model = LayoutLMv2ForTokenClassification.from_pretrained("nielsr/layoutlmv2-fine
|
|
| 16 |
|
| 17 |
# load image example
|
| 18 |
dataset = load_dataset("nielsr/funsd", split="test", trust_remote_code=True)
|
| 19 |
-
image = Image.open(dataset[0]["
|
| 20 |
image = Image.open("./invoice.png")
|
| 21 |
image.save("document.png")
|
| 22 |
# define id2label, label2color
|
|
|
|
| 16 |
|
| 17 |
# load image example
|
| 18 |
dataset = load_dataset("nielsr/funsd", split="test", trust_remote_code=True)
|
| 19 |
+
image = Image.open(dataset[0]["image"]).convert("RGB")
|
| 20 |
image = Image.open("./invoice.png")
|
| 21 |
image.save("document.png")
|
| 22 |
# define id2label, label2color
|