vivekreddyr commited on
Commit
ff5d647
·
verified ·
1 Parent(s): 2bf6da3

Quota-friendlier chunking (12/chunk) and lower table/chart token caps

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -59,13 +59,14 @@ PROMPTS = {
59
  }
60
 
61
  # Max new tokens per task (tables/charts can be long).
62
- MAX_TOKENS = {"ocr": 1024, "table": 2048, "formula": 512, "chart": 1536}
63
 
64
- # Free ZeroGPU caps per-call duration, and the scheduler scales the declared
65
- # duration up by a safety factor. Keep each GPU allocation short and process the
66
- # page's zones in small chunks across several allocations.
 
67
  GPU_DURATION = 55
68
- CHUNK = 8
69
 
70
  # Map a layout label to a recognition task. Anything not listed -> "ocr".
71
  LABEL_TO_TASK = {
 
59
  }
60
 
61
  # Max new tokens per task (tables/charts can be long).
62
+ MAX_TOKENS = {"ocr": 1024, "table": 1536, "formula": 512, "chart": 1024}
63
 
64
+ # Free ZeroGPU caps per-call duration (the scheduler scales the declared duration
65
+ # up by a safety factor, so keep it modest) AND caps total GPU-seconds/day per
66
+ # visitor. Process zones in chunks: few enough allocations to be quota-friendly,
67
+ # short enough per call to stay under the duration cap.
68
  GPU_DURATION = 55
69
+ CHUNK = 12
70
 
71
  # Map a layout label to a recognition task. Anything not listed -> "ocr".
72
  LABEL_TO_TASK = {