Spaces:
Running
on
Zero
Running
on
Zero
tori29umai
commited on
Commit
•
906508c
1
Parent(s):
d0a94a5
Update app.py
Browse files
app.py
CHANGED
@@ -95,13 +95,13 @@ class Img2Img:
|
|
95 |
with gr.Row():
|
96 |
with gr.Column():
|
97 |
self.input_image_path = gr.Image(label="Input image", type='filepath')
|
98 |
-
self.
|
99 |
|
100 |
# 自動背景除去トリガー
|
101 |
self.input_image_path.change(
|
102 |
fn=self.auto_background_removal,
|
103 |
inputs=[self.input_image_path],
|
104 |
-
outputs=[self.
|
105 |
)
|
106 |
|
107 |
self.prompt = gr.Textbox(label="Prompt", lines=3)
|
@@ -115,13 +115,13 @@ class Img2Img:
|
|
115 |
|
116 |
prompt_analysis_button.click(
|
117 |
fn=self.process_prompt_analysis,
|
118 |
-
inputs=[self.
|
119 |
outputs=self.prompt
|
120 |
)
|
121 |
|
122 |
generate_button.click(
|
123 |
fn=predict,
|
124 |
-
inputs=[self.
|
125 |
outputs=self.output_image
|
126 |
)
|
127 |
return demo
|
|
|
95 |
with gr.Row():
|
96 |
with gr.Column():
|
97 |
self.input_image_path = gr.Image(label="Input image", type='filepath')
|
98 |
+
self.bg_removed_image_path = gr.Image(label="Background Removed Image", type='filepath')
|
99 |
|
100 |
# 自動背景除去トリガー
|
101 |
self.input_image_path.change(
|
102 |
fn=self.auto_background_removal,
|
103 |
inputs=[self.input_image_path],
|
104 |
+
outputs=[self.bg_removed_image_path]
|
105 |
)
|
106 |
|
107 |
self.prompt = gr.Textbox(label="Prompt", lines=3)
|
|
|
115 |
|
116 |
prompt_analysis_button.click(
|
117 |
fn=self.process_prompt_analysis,
|
118 |
+
inputs=[self.bg_removed_image_path],
|
119 |
outputs=self.prompt
|
120 |
)
|
121 |
|
122 |
generate_button.click(
|
123 |
fn=predict,
|
124 |
+
inputs=[self.bg_removed_image_path, self.prompt, self.negative_prompt, self.controlnet_scale],
|
125 |
outputs=self.output_image
|
126 |
)
|
127 |
return demo
|