rehan953 commited on
Commit
6d50ffe
·
verified ·
1 Parent(s): 3031e77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -283,9 +283,8 @@ def run_ocr(uploaded_file):
283
  if page_md:
284
  parts.append(page_md)
285
 
286
- # Only run footer band if API actually detected a footer region via bbox
287
- # (footer_start_frac is None when MaaS finds no footer — avoids grabbing body content)
288
- if footer_start_frac is not None and page_num < len(page_images):
289
  img_path = page_images[page_num]
290
  ftr = ""
291
  if is_pdf:
@@ -315,4 +314,4 @@ with gr.Blocks(title="GLM-OCR") as demo:
315
  run_btn.click(fn=run_ocr, inputs=file_in, outputs=out)
316
 
317
  if __name__ == "__main__":
318
- demo.launch()
 
283
  if page_md:
284
  parts.append(page_md)
285
 
286
+ # Always run footer band (bottom 8–12% of page)
287
+ if page_num < len(page_images):
 
288
  img_path = page_images[page_num]
289
  ftr = ""
290
  if is_pdf:
 
314
  run_btn.click(fn=run_ocr, inputs=file_in, outputs=out)
315
 
316
  if __name__ == "__main__":
317
+ demo.launch()