omkar56 commited on
Commit
24932a5
·
1 Parent(s): b2dffc2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -0
main.py CHANGED
@@ -26,9 +26,13 @@ async def ocr(
26
  languages: list = Body(["eng"])
27
  ):
28
  try:
 
29
  content = await image.read()
 
30
  image = Image.open(BytesIO(content))
 
31
  text = pytesseract.image_to_string(image, lang="+".join(languages))
 
32
  except Exception as e:
33
  return {"error": str(e)}, 500
34
 
 
26
  languages: list = Body(["eng"])
27
  ):
28
  try:
29
+ print("[where?] inside try block")
30
  content = await image.read()
31
+ print("[content]",content)
32
  image = Image.open(BytesIO(content))
33
+ print("[image]",image)
34
  text = pytesseract.image_to_string(image, lang="+".join(languages))
35
+ print("[text]",text)
36
  except Exception as e:
37
  return {"error": str(e)}, 500
38