Theivaprakasham commited on
Commit
42bce9a
1 Parent(s): fc2e5bb
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -15,9 +15,9 @@ model = LayoutLMv2ForTokenClassification.from_pretrained("Theivaprakasham/layout
15
 
16
  # load image example
17
  dataset = load_dataset("darentang/generated", split="test")
18
- Image.open(dataset[50]["image_path"]).convert("RGB").save("example1.png")
19
- Image.open(dataset[14]["image_path"]).convert("RGB").save("example2.png")
20
- Image.open(dataset[20]["image_path"]).convert("RGB").save("example3.png")
21
  # define id2label, label2color
22
  labels = dataset.features['ner_tags'].feature.names
23
  id2label = {v: k for v, k in enumerate(labels)}
 
15
 
16
  # load image example
17
  dataset = load_dataset("darentang/generated", split="test")
18
+ Image.open(dataset[2]["image_path"]).convert("RGB").save("example1.png")
19
+ Image.open(dataset[1]["image_path"]).convert("RGB").save("example2.png")
20
+ Image.open(dataset[0]["image_path"]).convert("RGB").save("example3.png")
21
  # define id2label, label2color
22
  labels = dataset.features['ner_tags'].feature.names
23
  id2label = {v: k for v, k in enumerate(labels)}