Spaces:
Sleeping
Sleeping
Update app_blocks.py
Browse files- 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
|