Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ Image.open(dataset[1]["image_path"]).convert("RGB").save("example2.png")
|
|
30 |
Image.open(dataset[0]["image_path"]).convert("RGB").save("example3.png")
|
31 |
# define id2label, label2color
|
32 |
labels = dataset.features['ner_tags'].feature.names
|
33 |
-
id2label = {
|
34 |
label2color = {'question':'blue', 'answer':'green', 'header':'orange', 'other':'violet'}
|
35 |
|
36 |
|
|
|
30 |
Image.open(dataset[0]["image_path"]).convert("RGB").save("example3.png")
|
31 |
# define id2label, label2color
|
32 |
labels = dataset.features['ner_tags'].feature.names
|
33 |
+
id2label = {0: 'O', 1: 'B-HEADER', 2: 'I-HEADER', 3: 'B-QUESTION', 4: 'I-QUESTION', 5: 'B-ANSWER', 6: 'I-ANSWER'}
|
34 |
label2color = {'question':'blue', 'answer':'green', 'header':'orange', 'other':'violet'}
|
35 |
|
36 |
|