Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
30 |
-
|
31 |
-
|
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']
|