| #!/usr/bin/env python | |
| """ | |
| DiffusionGemma Humanizer — Modal Pipeline Launcher | |
| ================================================== | |
| Runs the full pipeline on a single A100 80GB via Modal. | |
| PREREQUISITES (one-time setup): | |
| pip install modal | |
| modal setup | |
| modal secret create hf-secrets HF_TOKEN=hf_your_token | |
| USAGE: | |
| python scripts/run.py | |
| """ | |
| import subprocess | |
| import sys | |
| def main(): | |
| print() | |
| print("=" * 64) | |
| print(" DiffusionGemma Humanizer — SOTA Text Humanization") | |
| print(" GPU: Single A100 80GB | Platform: Modal") | |
| print("=" * 64) | |
| print() | |
| print("[RUN] Deploying full pipeline to Modal...") | |
| print() | |
| result = subprocess.run(["modal", "run", "modal_project/app.py::run_full_pipeline"]) | |
| if result.returncode != 0: | |
| print() | |
| print("[FAIL] Pipeline failed. Check error above.") | |
| print(" Common fixes:") | |
| print(" 1. modal account show (check balance)") | |
| print(" 2. modal secret create hf-secrets HF_TOKEN=hf_your_token") | |
| print(" 3. Verify token has 'Write' permission") | |
| sys.exit(1) | |
| print() | |
| print("=" * 64) | |
| print(" Pipeline complete!") | |
| print(" Results in Modal volume: /data/output") | |
| print("=" * 64) | |
| if __name__ == "__main__": | |
| main() | |