minhvh commited on
Commit
c3a69eb
·
verified ·
1 Parent(s): 63089ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -44,7 +44,7 @@ def draw_ocr(image: Image.Image, text_regions: list, box_color="red", text_color
44
  x1, y1 = bbox["x1"], bbox["y1"]
45
  x2, y2 = bbox["x2"], bbox["y2"]
46
  draw.rectangle([x1, y1, x2, y2], outline=box_color, width=2)
47
- draw.text((x1, max(y1 - 12, 0)), f"{text} ({confidence})", fill=text_color)
48
  return image
49
 
50
  def extract_json(result_json: Dict, include_bbox: bool = False) -> Dict:
 
44
  x1, y1 = bbox["x1"], bbox["y1"]
45
  x2, y2 = bbox["x2"], bbox["y2"]
46
  draw.rectangle([x1, y1, x2, y2], outline=box_color, width=2)
47
+ # draw.text((x1, max(y1 - 12, 0)), f"{text} ({confidence})", fill=text_color)
48
  return image
49
 
50
  def extract_json(result_json: Dict, include_bbox: bool = False) -> Dict: