Shami96 commited on
Commit
dff6f36
·
verified ·
1 Parent(s): bd54780

Update extract_red_text.py

Browse files
Files changed (1) hide show
  1. extract_red_text.py +3 -2
extract_red_text.py CHANGED
@@ -388,8 +388,9 @@ def extract_from_docx(path: str) -> Dict[str, Any]:
388
  "total_tables": len(tables_out),
389
  "total_red_runs": len(red_runs),
390
  "total_red_cells": sum(
391
- sum(1 for cell in row_red_cells if cell for row_red_cells in table["red_cells"])
392
- for table in tables_out
 
393
  ),
394
  "global_settings_used": {
395
  "normalization": GLOBAL_SETTINGS.get("normalize", {}),
 
388
  "total_tables": len(tables_out),
389
  "total_red_runs": len(red_runs),
390
  "total_red_cells": sum(
391
+ sum(1 for cell in row_red_cells if cell)
392
+ for table in tables_out
393
+ for row_red_cells in table["red_cells"]
394
  ),
395
  "global_settings_used": {
396
  "normalization": GLOBAL_SETTINGS.get("normalize", {}),