from ocr.base import GeminiExtractor _PROMPT = """ Extract PAN card details from this image. Return JSON in this format: { "document_type": "PAN", "name": "", "father_name": "", "pan_number": "", "date_of_birth": "" } Return ONLY valid JSON. """ _extractor = GeminiExtractor(_PROMPT) def parse_pan(image_bytes: bytes) -> dict: return _extractor.extract(image_bytes)