JimmyK300 commited on
Commit
6e9a64e
·
verified ·
1 Parent(s): 3e35d59

Update app_blocks.py

Browse files
Files changed (1) hide show
  1. app_blocks.py +0 -3
app_blocks.py CHANGED
@@ -11,9 +11,6 @@ import gradio as gr
11
  # return pytesseract.image_to_string(image=image, lang=', '.join(languages) if languages else None, config='--psm ' + str(psm))
12
 
13
  def tesseract_ocr(filepath: str, languages: List[str] = None, psm: int = 7):
14
- if not os.path.exists(filepath):
15
- return "Error: File not found."
16
-
17
  try:
18
  image = Image.open(filepath)
19
  lang = ','.join(languages) if languages else None
 
11
  # return pytesseract.image_to_string(image=image, lang=', '.join(languages) if languages else None, config='--psm ' + str(psm))
12
 
13
  def tesseract_ocr(filepath: str, languages: List[str] = None, psm: int = 7):
 
 
 
14
  try:
15
  image = Image.open(filepath)
16
  lang = ','.join(languages) if languages else None