Update main.py
Browse files
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:
|