ChiKyi commited on
Commit
3477013
1 Parent(s): 618acb1

update visible

Browse files
Files changed (1) hide show
  1. app.py +22 -20
app.py CHANGED
@@ -188,27 +188,29 @@ def gradio_interface():
188
 
189
  with gr.Tab("Prompt_Guided(ControlNet-SDXL)"):
190
  with gr.Blocks():
191
- sd_image = gr.Image(label="Upload a Color Image")
192
- positive_prompt = gr.Textbox(label="Positive Prompt", placeholder="Text for positive prompt")
193
- negative_prompt = gr.Textbox(
194
- value="low quality, bad quality, low contrast, black and white, bw, monochrome, grainy, blurry, historical, restored, desaturate",
195
- label="Negative Prompt", placeholder="Text for negative prompt"
196
- )
197
- generate_caption = gr.Checkbox(label="Generate Caption?", value=True)
198
- seed = gr.Number(label="Seed", value=123, precision=0)
199
- inference_steps = gr.Number(label="Inference Steps", value=5, precision=0)
200
-
201
- submit_sd = gr.Button("Generate")
202
-
203
-
204
- sd_output_image = gr.Image(label="Colorized Image")
205
- sd_caption = gr.Textbox(label="Captioning Result", show_copy_button=True, visible=True)
206
-
207
-
 
 
208
  submit_sd.click(
209
- fn=colorize_image_sdxl,
210
- inputs=[sd_image, positive_prompt, negative_prompt, generate_caption, seed, inference_steps],
211
- outputs=[sd_output_image, sd_caption]
212
  )
213
 
214
  return app
 
188
 
189
  with gr.Tab("Prompt_Guided(ControlNet-SDXL)"):
190
  with gr.Blocks():
191
+ with gr.Row():
192
+ with gr.Column(scale=1):
193
+ sd_image = gr.Image(label="Upload a Color Image")
194
+ positive_prompt = gr.Textbox(label="Positive Prompt", placeholder="Text for positive prompt")
195
+ negative_prompt = gr.Textbox(
196
+ value="low quality, bad quality, low contrast, black and white, bw, monochrome, grainy, blurry, historical, restored, desaturate",
197
+ label="Negative Prompt", placeholder="Text for negative prompt"
198
+ )
199
+ generate_caption = gr.Checkbox(label="Generate Caption?", value=True)
200
+ seed = gr.Number(label="Seed", value=123, precision=0)
201
+ inference_steps = gr.Number(label="Inference Steps", value=5, precision=0)
202
+ submit_sd = gr.Button("Generate")
203
+
204
+
205
+ with gr.Column(scale=1):
206
+ sd_output_image = gr.Image(label="Colorized Image")
207
+ sd_caption = gr.Textbox(label="Captioning Result", show_copy_button=True, visible=True)
208
+
209
+
210
  submit_sd.click(
211
+ fn=colorize_image_sdxl,
212
+ inputs=[sd_image, positive_prompt, negative_prompt, generate_caption, seed, inference_steps],
213
+ outputs=[sd_output_image, sd_caption]
214
  )
215
 
216
  return app