Update main.py
Browse files
main.py
CHANGED
@@ -31,10 +31,10 @@ async def ocr(
|
|
31 |
print("[image]",image)
|
32 |
if hasattr(pytesseract, "image_to_string"):
|
33 |
print("Image to string function is available")
|
|
|
34 |
else:
|
35 |
print("Image to string function is not available")
|
36 |
# text = pytesseract.image_to_string(image, lang="+".join(languages))
|
37 |
-
# text = pytesseract.image_to_string(image, lang = 'eng')
|
38 |
except Exception as e:
|
39 |
return {"error": str(e)}, 500
|
40 |
|
|
|
31 |
print("[image]",image)
|
32 |
if hasattr(pytesseract, "image_to_string"):
|
33 |
print("Image to string function is available")
|
34 |
+
print(pytesseract.image_to_string(image, lang = 'eng'))
|
35 |
else:
|
36 |
print("Image to string function is not available")
|
37 |
# text = pytesseract.image_to_string(image, lang="+".join(languages))
|
|
|
38 |
except Exception as e:
|
39 |
return {"error": str(e)}, 500
|
40 |
|