SlASH / app.py
sejamenath2023's picture
Create app.py
67c1e60
raw
history blame contribute delete
648 Bytes
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)