Spaces:
Runtime error
Runtime error
import subprocess | |
import os | |
import torch | |
if torch.cuda.is_available(): | |
subprocess.run(["apt-get", "install", "nvidia-cuda-toolkit"], check=True) | |
print("Using GPU") | |
else: | |
print("Using CPU") | |
# Clone the repository | |
subprocess.run(["git", "clone", "https://github.com/facefusion/facefusion"], check=True) | |
# chande directory to face fusion to run ui | |
os.chdir("facefusion") | |
# installation | |
subprocess.run(["python", "install.py", "--onnxruntime", "cuda-11.8", "--skip-venv"], check=True) | |
# Run the ui | |
subprocess.run(["python", "run.py", "--execution-providers", "cpu"], check=True) | |