Skip to content

Commit

Permalink
convert to PIL image
Browse files Browse the repository at this point in the history
  • Loading branch information
mhashim6 committed Aug 1, 2020
1 parent 28e0fe0 commit 42bb44a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocr/ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ def ocr (image, language):
args: input image
language; eg: 'ara' fro arabic, 'en' for english ... etc
"""
result = tesserocr.image_to_text(image, lang= language)
result = tesserocr.image_to_text(Image.fromarray(image), lang=language)
return result

0 comments on commit 42bb44a

Please sign in to comment.