Spaces:
Sleeping
Sleeping
JarvisLabs
commited on
Commit
•
bd172ac
1
Parent(s):
32b3901
Upload ipadapter_tab.py
Browse files- ipadapter_tab.py +18 -0
ipadapter_tab.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from src.fal_api import fal_ipadapter_api
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
|
5 |
+
def create_ipadaptor_tab():
|
6 |
+
|
7 |
+
with gr.TabItem("Cloth IP Adapter",id="cloth_ip_adapter"):
|
8 |
+
with gr.Row():
|
9 |
+
with gr.Column():
|
10 |
+
api_inp = gr.Image(label="Base Image")
|
11 |
+
ap_prompt = gr.Textbox(label="clothe prompt")
|
12 |
+
with gr.Column():
|
13 |
+
ap_image = gr.Image(label="IP Adapter Image")
|
14 |
+
ap_btn = gr.Button("Process")
|
15 |
+
with gr.Row():
|
16 |
+
api_out = gr.Image(label="Output",type="filepath")
|
17 |
+
|
18 |
+
ap_btn.click(fal_ipadapter_api,inputs=[api_inp,ap_image,ap_prompt],outputs=api_out)
|