Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|
|
|
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)
|