dinhquangson commited on
Commit
0840e8a
1 Parent(s): 6392fab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -77,8 +77,11 @@ def extract_ocr_text_from_pdf(pdf_path):
77
  from pdf2image import convert_from_path
78
  images = convert_from_path(pdf_path)
79
 
 
 
80
  for image in images:
81
  text += pytesseract.image_to_string(image,lang='vie')
 
82
  return text
83
 
84
  @app.post("/uploadfile/")
 
77
  from pdf2image import convert_from_path
78
  images = convert_from_path(pdf_path)
79
 
80
+ text= ""
81
+
82
  for image in images:
83
  text += pytesseract.image_to_string(image,lang='vie')
84
+
85
  return text
86
 
87
  @app.post("/uploadfile/")