comfyworkspace / app.py
bhagu75's picture
Create app.py
9d7bf1d verified
raw
history blame contribute delete
533 Bytes
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()