oussama commited on
Commit
a45b18d
1 Parent(s): 19bebec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 = {v: k for v, k in enumerate(labels)}
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