mohammad2928git commited on
Commit
2c6c75a
·
verified ·
1 Parent(s): af2f9bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -16,7 +16,6 @@ import datasets
16
  from datasets import load_dataset, Image
17
  from PIL import Image
18
  from paddleocr import PaddleOCR
19
- from save_data import flag
20
  import pytesseract
21
  from pdf2image import convert_from_path
22
  from PIL import Image
@@ -118,10 +117,6 @@ def generate_ocr(Method,img):
118
  text_output = ocr_with_paddle(img)
119
  if Method == 'tesseract':
120
  text_output = process("img", img, "fas")
121
- try:
122
- flag(Method,text_output,img)
123
- except Exception as e:
124
- print(e)
125
  return text_output
126
  else:
127
  raise gr.Error("Please upload an image!!!!")
 
16
  from datasets import load_dataset, Image
17
  from PIL import Image
18
  from paddleocr import PaddleOCR
 
19
  import pytesseract
20
  from pdf2image import convert_from_path
21
  from PIL import Image
 
117
  text_output = ocr_with_paddle(img)
118
  if Method == 'tesseract':
119
  text_output = process("img", img, "fas")
 
 
 
 
120
  return text_output
121
  else:
122
  raise gr.Error("Please upload an image!!!!")