Update src/app/task.py
Browse files- src/app/task.py +0 -4
src/app/task.py
CHANGED
@@ -24,10 +24,6 @@ def ocr_task(image: Image.Image) -> Tuple[Image.Image, str]:
|
|
24 |
tuple: A tuple containing the output image with OCR bounding boxes drawn and the cleaned OCR text.
|
25 |
"""
|
26 |
try:
|
27 |
-
# Check if image is None
|
28 |
-
if image is None:
|
29 |
-
gr.Error("Please provide an image.")
|
30 |
-
|
31 |
# Task prompts
|
32 |
ocr_prompt = "<OCR>"
|
33 |
ocr_with_region_prompt = "<OCR_WITH_REGION>"
|
|
|
24 |
tuple: A tuple containing the output image with OCR bounding boxes drawn and the cleaned OCR text.
|
25 |
"""
|
26 |
try:
|
|
|
|
|
|
|
|
|
27 |
# Task prompts
|
28 |
ocr_prompt = "<OCR>"
|
29 |
ocr_with_region_prompt = "<OCR_WITH_REGION>"
|