File size: 332 Bytes
0c0a4f7
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
# tests/quick_azure_test.py
import os, json, sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))  # add project root
from rag.ocr_azure import parse_passport_azure

with open("data/passports/12.png", "rb") as f:
    profile = parse_passport_azure(f.read())
print(json.dumps(profile, indent=2))