Ajaykumar10/Automatic_Number_Plate_Recognition_ANPR_System
0
1"""2This script is run ONCE at build time (via Dockerfile)3to pre-download EasyOCR models so the app starts instantly.4"""5import os6import easyocr7 8MODEL_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "models")9os.makedirs(MODEL_DIR, exist_ok=True)10 11print(f"Pre-downloading EasyOCR models to {MODEL_DIR} ...")12reader = easyocr.Reader(13 ['en'],14 gpu=False,15 verbose=True,16 model_storage_directory=MODEL_DIR,17 download_enabled=True18)19print("✓ EasyOCR models downloaded successfully!")20 