Fooocus / app.py
Abhi2025's picture
Update app.py
b00d19f verified
import subprocess
import os
# Define the Git clone command
git_clone_command = 'git clone https://github.com/facefusion/facefusion'
# Execute the Git clone command using subprocess
try:
subprocess.run(git_clone_command, shell=True, check=True)
print("Git clone successful.")
except subprocess.CalledProcessError as e:
print(f"Error executing Git clone command: {e}")
# Change directory to the cloned repository
os.chdir('facefusion')
# Define the command to run the Python script
python_script_commandok = 'pip install -r requirements.txt '
# Execute the Python script command using subprocess
try:
subprocess.run(python_script_commandok, shell=True, check=True)
print("Python script executed successfully.")
except subprocess.CalledProcessError as e:
print(f"Error executing Python script: {e}")
# Define the command to run the Python script
python_script_command = 'python install.py '
# Execute the Python script command using subprocess
try:
subprocess.run(python_script_command, shell=True, check=True)
print("Python script executed successfully.")
except subprocess.CalledProcessError as e:
print(f"Error executing Python script: {e}")
# Define the command to run the Python script
python_script_run_command = 'python run.py'
# Execute the Python script command using subprocess
try:
subprocess.run(python_script_run_command, shell=True, check=True)
print("Python script executed successfully.")
except subprocess.CalledProcessError as e:
print(f"Error executing Python script: {e}")