Spaces:
Build error
Build error
| import os | |
| import subprocess | |
| import gradio as gr | |
| # Clone ComfyUI repository | |
| if not os.path.exists("ComfyUI"): | |
| subprocess.run(["git", "clone", "https://github.com/comfyanonymous/ComfyUI.git"]) | |
| # Install ComfyUI dependencies | |
| subprocess.run(["pip", "install", "-r", "ComfyUI/requirements.txt"]) | |
| # Define a Gradio interface | |
| def run_comfyui(prompt): | |
| # Add your ComfyUI logic here | |
| return f"Generated output for: {prompt}" | |
| # Launch Gradio app | |
| iface = gr.Interface(fn=run_comfyui, inputs="text", outputs="text") | |
| iface.launch() |