Bandey commited on
Commit
58a3565
1 Parent(s): 8fd8a66

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+ import os
3
+
4
+ # Set the device to CPU explicitly
5
+ device = "cpu"
6
+ print("Using CPU")
7
+
8
+ # Clone the repository
9
+ subprocess.run(["git", "clone", "https://github.com/facefusion/facefusion", "--single-branch"], check=True)
10
+
11
+ # Change directory to facefusion to run the UI
12
+ os.chdir("facefusion")
13
+
14
+ # Install dependencies for CPU mode
15
+ subprocess.run(["python", "install.py", "--onnxruntime", "default", "--skip-conda"], check=True)
16
+
17
+ # Run the UI in CPU mode
18
+ subprocess.run(["python", "facefusion.py", "run", "--execution-providers", "cpu"], check=True)