Spaces:
Paused
Paused
feat: Add validation to skip duplicate header rows in batch processing
Browse files- Skip rows where majority of cell values match column names (header duplicates)
- Add tests_data/ to .gitignore to prevent binary xlsx files from being committed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Files changed (2)
54 unmodified lines55565758596054 unmodified lines# Ігноруємо тестові файлиdata_test/# Ігноруємо додані документиAdd_docs/54 unmodified lines5556575859606154 unmodified lines# Ігноруємо тестові файлиdata_test/tests_data/# Ігноруємо додані документиAdd_docs/
417 unmodified lines418419420421422423417 unmodified linescourt_decision_text = str(row['text'])# Generate legal positiontry:legal_position_json = generate_legal_position(417 unmodified lines418419420421422423424425426427428429430417 unmodified linescourt_decision_text = str(row['text'])# Skip rows where cell values match column names — these are duplicate header rowscol_values = {str(col): str(row[col]) for col in row.index}header_matches = sum(1 for col, val in col_values.items() if val == col)if header_matches >= max(1, len(col_values) // 2):results.append("ПРОПУЩЕНО: рядок містить назви колонок (дублікат заголовка)")continue# Generate legal positiontry:legal_position_json = generate_legal_position(
.gitignore+1
interface.py+7