sejamenath2023
commited on
Commit
•
67c1e60
1
Parent(s):
689529b
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import subprocess
|
2 |
+
|
3 |
+
# Run shell commands
|
4 |
+
commands = [
|
5 |
+
"pip install pygit2==1.12.2",
|
6 |
+
"cd /content",
|
7 |
+
"git clone https://github.com/lllyasviel/Fooocus.git",
|
8 |
+
"cd /content/Fooocus",
|
9 |
+
"python entry_with_update.py --share"
|
10 |
+
]
|
11 |
+
|
12 |
+
for command in commands:
|
13 |
+
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
14 |
+
output, error = process.communicate()
|
15 |
+
|
16 |
+
# Check for errors
|
17 |
+
if process.returncode != 0:
|
18 |
+
print(f"Error executing command: {command}")
|
19 |
+
print(f"Error message: {error}")
|
20 |
+
else:
|
21 |
+
print(f"Output of command: {command}")
|
22 |
+
print(output)
|