Spaces:
Running
Running
github-actions[bot]
Deploy from GitHub 39b3777315c11d9c8bcd39ad7bf034f2a88a7379 (filtered: code + Dockerfile + README + NOTICES only)
2e175db | """ | |
| Pre-download CLIP weights to the HuggingFace cache. | |
| Run during Docker image build or first deploy so the first user-facing | |
| request isn't blocked by a multi-hundred-MB download. | |
| Usage | |
| ----- | |
| python scripts/download_weights.py | |
| """ | |
| from __future__ import annotations | |
| def main() -> None: | |
| from transformers import CLIPModel, CLIPProcessor | |
| from deepfake_scanner.config import settings | |
| name = settings.clip_model_name | |
| print(f"Downloading {name} (Apache-2.0 transformers, MIT-licensed weights)...") | |
| CLIPProcessor.from_pretrained(name) | |
| CLIPModel.from_pretrained(name) | |
| print("Done. Weights cached.") | |
| if __name__ == "__main__": | |
| main() | |