gaunernst commited on
Commit
ba297da
·
verified ·
1 Parent(s): ce94e87

add trust remote code

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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")