Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -238,13 +238,15 @@ def draw_boxes(image, bounds, ocr_sens,width=1):
|
|
238 |
return image
|
239 |
|
240 |
def detect(img, target_lang,trans_lang,ocr_sens,font_fac,t_color):
|
|
|
241 |
if target_lang2 != None and target_lang2 != "":
|
242 |
lang=f"{lang_id[target_lang]}"
|
243 |
lang2=f"{lang_id[target_lang2]}"
|
244 |
lang=[lang,lang2]
|
245 |
else:
|
246 |
-
|
247 |
-
|
|
|
248 |
|
249 |
img = Image.open(img)
|
250 |
img.thumbnail((1000,1000), Image.Resampling.LANCZOS)
|
|
|
238 |
return image
|
239 |
|
240 |
def detect(img, target_lang,trans_lang,ocr_sens,font_fac,t_color):
|
241 |
+
'''
|
242 |
if target_lang2 != None and target_lang2 != "":
|
243 |
lang=f"{lang_id[target_lang]}"
|
244 |
lang2=f"{lang_id[target_lang2]}"
|
245 |
lang=[lang,lang2]
|
246 |
else:
|
247 |
+
'''
|
248 |
+
lang=[f"{ocr_id[target_lang]}"]
|
249 |
+
|
250 |
|
251 |
img = Image.open(img)
|
252 |
img.thumbnail((1000,1000), Image.Resampling.LANCZOS)
|