import os import gradio as gr import subprocess # Clone the Fooocus repository if not os.path.exists("Fooocus"): subprocess.run(["git", "clone", "https://github.com/lllyasviel/Fooocus.git"]) os.chdir("Fooocus") subprocess.run(["python3", "entry_with_update.py"]) # Downloads models and starts the app else: os.chdir("Fooocus") # Placeholder interface while app boots with gr.Blocks() as demo: gr.Markdown("## 🧠 Loading Fooocus... Please wait a few minutes ⏳") demo.launch()