Sathvik-kota commited on
Commit
e72fa08
·
verified ·
1 Parent(s): 9548699

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -542,7 +542,7 @@ def detect_totals_in_rows(rows: List[List[Dict[str, Any]]]) -> Tuple[Optional[fl
542
  row_text = " ".join([c["text"] for c in row])
543
  row_lower = row_text.lower()
544
  header_hit_count = sum(1 for h in HEADER_KEYWORDS if h in row_lower)
545
- if row_lower in HEADER_PHRASES or header_hit_count >= 3:
546
  continue
547
  tokens = row_text.split()
548
 
 
542
  row_text = " ".join([c["text"] for c in row])
543
  row_lower = row_text.lower()
544
  header_hit_count = sum(1 for h in HEADER_KEYWORDS if h in row_lower)
545
+ if any(phrase in row_lower for phrase in HEADER_PHRASES) or header_hit_count >= 3:
546
  continue
547
  tokens = row_text.split()
548