Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -81,6 +81,7 @@ ocr_lang=[
|
|
81 |
'ta',
|
82 |
'tab',
|
83 |
'te',
|
|
|
84 |
'tjk',
|
85 |
'tl',
|
86 |
'tr',
|
@@ -102,7 +103,7 @@ def draw_boxes(image, bounds, color='blue', width=1):
|
|
102 |
draw.line([*p0, *p1, *p2, *p3, *p0], fill=color, width=width)
|
103 |
return image
|
104 |
|
105 |
-
def detect(img, lang=ocr_lang):
|
106 |
reader = easyocr.Reader(lang)
|
107 |
bounds = reader.readtext(img)
|
108 |
im = PIL.Image.open(img)
|
|
|
81 |
'ta',
|
82 |
'tab',
|
83 |
'te',
|
84 |
+
'th',
|
85 |
'tjk',
|
86 |
'tl',
|
87 |
'tr',
|
|
|
103 |
draw.line([*p0, *p1, *p2, *p3, *p0], fill=color, width=width)
|
104 |
return image
|
105 |
|
106 |
+
def detect(img, lang=[ocr_lang,'en']):
|
107 |
reader = easyocr.Reader(lang)
|
108 |
bounds = reader.readtext(img)
|
109 |
im = PIL.Image.open(img)
|