Spaces:
Build error
Build error
Download scripts/setup_e2e.py from MissawB/animetix-web: direct link, hf CLI and curl.
- Browser
- Download file 617 Bytes
-
https://huggingface.co/spaces/MissawB/animetix-web/resolve/main/scripts/setup_e2e.py
- Command line
-
hf download hf://spaces/MissawB/animetix-web/scripts/setup_e2e.py
-
curl -L -o setup_e2e.py https://huggingface.co/spaces/MissawB/animetix-web/resolve/main/scripts/setup_e2e.py
617 Bytes
| import subprocess | |
| import sys | |
| def setup_e2e(): | |
| """Installs Playwright and its browser dependencies.""" | |
| print("🚀 Installing Playwright browsers...") | |
| try: | |
| subprocess.run([sys.executable, "-m", "playwright", "install", "--with-deps", "chromium"], check=True) | |
| print("✅ Playwright installation successful.") | |
| except subprocess.CalledProcessError as e: | |
| print(f"❌ Playwright installation failed: {e}") | |
| except FileNotFoundError: | |
| print("❌ Playwright module not found. Please run 'pip install -r requirements.txt' first.") | |
| if __name__ == "__main__": | |
| setup_e2e() | |