Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
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 |
|