Files
DeepFaceLab_Linux/restart.py
T

26 lines
619 B
Python

#!/usr/bin/env python3
import os
import sys
import time
# Change directory to the project root
os.chdir(os.path.dirname(os.path.abspath(__file__)))
try:
import manage_webui
except ImportError:
print("Error: manage_webui.py not found in the project root.", file=sys.stderr)
sys.exit(1)
if __name__ == '__main__':
manage_webui.stop()
time.sleep(1)
# Setup check and auto-install baked in
if not os.path.exists(manage_webui.VENV_DIR):
print("Virtual environment not found. Initializing setup...")
manage_webui.setup()
print("")
manage_webui.start()