kai-sheng commited on
Commit
18d078a
·
verified ·
1 Parent(s): fc19934

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -77,7 +77,7 @@ def generate_caption():
77
  # Convert the image data to a PIL image object
78
  pil_image = Image.open(io.BytesIO(image_data))
79
 
80
- extracted_text = pytesseract.image_to_string(pil_image)
81
  hasText = bool(extracted_text.strip())
82
 
83
  if hasText:
 
77
  # Convert the image data to a PIL image object
78
  pil_image = Image.open(io.BytesIO(image_data))
79
 
80
+ extracted_text = pytesseract.image_to_string(pil_image, lang="eng+chi_sim+msa")
81
  hasText = bool(extracted_text.strip())
82
 
83
  if hasText: