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