SickBoy commited on
Commit
00ef9c1
1 Parent(s): 0d6f9e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,9 +26,9 @@ model = AutoModelForTokenClassification.from_pretrained("SickBoy/layoutlm_docume
26
 
27
  # load image example
28
  dataset = load_dataset("SickBoy/layout_documents", split="train")
29
- Image.open(dataset[2]["image_path"]).convert("RGB").save("example1.png")
30
- Image.open(dataset[1]["image_path"]).convert("RGB").save("example2.png")
31
- Image.open(dataset[0]["image_path"]).convert("RGB").save("example3.png")
32
  # define id2label, label2color
33
  #labels = dataset.features['ner_tags'].feature.names
34
  labels = ['O', 'HEADER', 'SUBHEADER', 'TEXTO', 'NUMERAL', 'RESUMEN']
 
26
 
27
  # load image example
28
  dataset = load_dataset("SickBoy/layout_documents", split="train")
29
+ dataset[2]["image"].convert("RGB").save("example1.png")
30
+ dataset[1]["image"].convert("RGB").save("example2.png")
31
+ dataset[0]["image"].convert("RGB").save("example3.png")
32
  # define id2label, label2color
33
  #labels = dataset.features['ner_tags'].feature.names
34
  labels = ['O', 'HEADER', 'SUBHEADER', 'TEXTO', 'NUMERAL', 'RESUMEN']