""" PyInstaller hook to exclude ML libraries during build This prevents PyInstaller from attempting to analyze and bundle heavy ML libraries that are incompatible with Python 3.13 or cause build crashes. These libraries will be installed at runtime if needed. """ # Collect any hidden imports (empty for this hook) hiddenimports = [] # Exclude all heavy ML dependencies excludedimports = [ 'torch', 'torch.nn', 'torch.utils', 'torchvision', 'transformers', 'tensorflow', 'tensorflow.keras', 'onnx', 'onnxruntime', 'sentencepiece', 'tokenizers', 'diffusers', 'accelerate', 'datasets', 'huggingface_hub', 'safetensors', 'optimum', 'coloredlogs', 'docutils', 'tqdm', ]