Spaces:
Running
Running
add trust remote code
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ processor = LayoutLMv2Processor.from_pretrained("microsoft/layoutlmv2-base-uncas
|
|
15 |
model = LayoutLMv2ForTokenClassification.from_pretrained("nielsr/layoutlmv2-finetuned-funsd")
|
16 |
|
17 |
# load image example
|
18 |
-
dataset = load_dataset("nielsr/funsd", split="test")
|
19 |
image = Image.open(dataset[0]["image_path"]).convert("RGB")
|
20 |
image = Image.open("./invoice.png")
|
21 |
image.save("document.png")
|
|
|
15 |
model = LayoutLMv2ForTokenClassification.from_pretrained("nielsr/layoutlmv2-finetuned-funsd")
|
16 |
|
17 |
# load image example
|
18 |
+
dataset = load_dataset("nielsr/funsd", split="test", trust_remote_code=True)
|
19 |
image = Image.open(dataset[0]["image_path"]).convert("RGB")
|
20 |
image = Image.open("./invoice.png")
|
21 |
image.save("document.png")
|