bhagu75 commited on
Commit
9d7bf1d
·
verified ·
1 Parent(s): 5de2c43

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ import gradio as gr
4
+
5
+ # Clone ComfyUI repository
6
+ if not os.path.exists("ComfyUI"):
7
+ subprocess.run(["git", "clone", "https://github.com/comfyanonymous/ComfyUI.git"])
8
+
9
+ # Install ComfyUI dependencies
10
+ subprocess.run(["pip", "install", "-r", "ComfyUI/requirements.txt"])
11
+
12
+ # Define a Gradio interface
13
+ def run_comfyui(prompt):
14
+ # Add your ComfyUI logic here
15
+ return f"Generated output for: {prompt}"
16
+
17
+ # Launch Gradio app
18
+ iface = gr.Interface(fn=run_comfyui, inputs="text", outputs="text")
19
+ iface.launch()