02alexander
commited on
Commit
•
90fc92b
1
Parent(s):
ca9b39d
care about limit
Browse files
ocr.py
CHANGED
@@ -385,9 +385,10 @@ def detect_and_log_layouts(log_queue: SimpleQueue[Any], file_path: str, start_pa
|
|
385 |
if len(images) > PAGE_LIMIT:
|
386 |
log_queue.put([
|
387 |
"log",
|
388 |
-
"
|
389 |
-
[rr.
|
390 |
])
|
|
|
391 |
else:
|
392 |
# read image
|
393 |
img = cv2.imread(file_path)
|
|
|
385 |
if len(images) > PAGE_LIMIT:
|
386 |
log_queue.put([
|
387 |
"log",
|
388 |
+
"progress",
|
389 |
+
[rr.TextDocument(f"Too many pages requsted: {len(images)} requested but the limit is {PAGE_LIMIT}")],
|
390 |
])
|
391 |
+
return
|
392 |
else:
|
393 |
# read image
|
394 |
img = cv2.imread(file_path)
|