phamvi856 commited on
Commit
fbd6b46
1 Parent(s): 412d259

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -88,6 +88,7 @@ def process_image(image):
88
  predicted_label = iob_to_label(prediction)
89
  draw.rectangle(box, outline=label2color[predicted_label])
90
  draw.text((box[0]+10, box[1]-10), text=predicted_label, fill=label2color[predicted_label], font=font)
 
91
 
92
  return image
93
 
 
88
  predicted_label = iob_to_label(prediction)
89
  draw.rectangle(box, outline=label2color[predicted_label])
90
  draw.text((box[0]+10, box[1]-10), text=predicted_label, fill=label2color[predicted_label], font=font)
91
+ draw.text((box[0]+10, box[1]+10), text=dataset[0]["ner_tags"][idx], fill='black', font=font)
92
 
93
  return image
94