#!/usr/bin/env python3
"""Test OCR on small set of cells"""

import sys
sys.path.insert(0, 'workflow')

from cells_to_csv import CellsToCSVExtractor

# Create extractor with Google Vision
extractor = CellsToCSVExtractor(
    ocr_engine='google',
    google_credentials_path='google-credentials.json',
    batch_size=16
)

# Process cells
print("Processing 3 cells with batch OCR...")
num_voters = extractor.extract_all_cells('/tmp/test_cells', '/tmp/test_output.csv')

print(f"\nExtracted {num_voters} voter records")
print("Check: /tmp/test_output.csv")
