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

Update extract_red_text.py

Browse files
Files changed (1) hide show
  1. extract_red_text.py +1 -1
extract_red_text.py CHANGED
@@ -388,7 +388,7 @@ 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 for cell in table["red_cells"] if cell)
392
  for table in tables_out
393
  ),
394
  "global_settings_used": {
 
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": {