02alexander commited on
Commit
90fc92b
1 Parent(s): ca9b39d

care about limit

Browse files
Files changed (1) hide show
  1. ocr.py +3 -2
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
- "error",
389
- [rr.TextLog(f"Too many pages requsted: {len(images)} requested but the limit is {PAGE_LIMIT}")],
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)