Omnibus commited on
Commit
81aba94
Β·
1 Parent(s): 7b85041

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -206,7 +206,8 @@ def draw_boxes(image, bounds, color='blue', width=1):
206
  draw.line([*p0, *p1, *p2, *p3, *p0], fill=color, width=width)
207
  return image
208
 
209
- def detect(img, lang):
 
210
  reader = easyocr.Reader(lang)
211
  bounds = reader.readtext(img)
212
  im = PIL.Image.open(img)
 
206
  draw.line([*p0, *p1, *p2, *p3, *p0], fill=color, width=width)
207
  return image
208
 
209
+ def detect(img, target_lang):
210
+ lang=lang_id[target_lang]
211
  reader = easyocr.Reader(lang)
212
  bounds = reader.readtext(img)
213
  im = PIL.Image.open(img)