uruguayai commited on
Commit
b842f07
·
verified ·
1 Parent(s): bace59d

Create 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
+ # Install the correct version of pygit2
5
+ subprocess.run(["pip", "install", "pygit2==1.15.1"])
6
+
7
+ # Clone the repository
8
+ repo_url = "https://github.com/lllyasviel/Fooocus.git"
9
+ repo_dir = "/home/user/app/Fooocus" # HF Space working directory
10
+
11
+ if not os.path.exists(repo_dir):
12
+ subprocess.run(["git", "clone", repo_url, repo_dir])
13
+
14
+ # Change to the cloned directory
15
+ os.chdir(repo_dir)
16
+
17
+ # Run the python script
18
+ subprocess.run(["python", "entry_with_update.py", "--share", "--always-high-vram"])