nielsr HF staff commited on
Commit
ece34a3
1 Parent(s): ce9c3b1

Update example

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