tori29umai commited on
Commit
906508c
1 Parent(s): d0a94a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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.bg_removed_image = gr.Image(label="Background Removed Image")
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]
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.input_image_path],
119
  outputs=self.prompt
120
  )
121
 
122
  generate_button.click(
123
  fn=predict,
124
- inputs=[self.input_image_path, self.prompt, self.negative_prompt, self.controlnet_scale],
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