Spaces:
Running
Running
Download app.py from Facefusion39/facefusion: direct link, hf CLI and curl.
- Browser
- Download file 548 Bytes
-
https://huggingface.co/spaces/Facefusion39/facefusion/resolve/main/app.py
- Command line
-
hf download hf://spaces/Facefusion39/facefusion/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Facefusion39/facefusion/resolve/main/app.py
548 Bytes
| import subprocess | |
| import os | |
| # Set the device to CPU explicitly | |
| device = "cpu" | |
| print("Using CPU") | |
| # Clone the repository | |
| subprocess.run(["git", "clone", "https://github.com/facefusion39/test1", "--single-branch"], check=True) | |
| # Change directory to facefusion to run the UI | |
| os.chdir("test1") | |
| # Install dependencies for CPU mode | |
| subprocess.run(["python", "install.py", "--onnxruntime", "default", "--skip-conda"], check=True) | |
| # Run the UI in CPU mode | |
| subprocess.run(["python", "facefusion.py", "run", "--execution-providers", "cpu"], check=True) | |