ysharma HF staff commited on
Commit
17a30ca
·
1 Parent(s): 4464edb
Files changed (1) hide show
  1. gradio_seg2image.py +3 -3
gradio_seg2image.py CHANGED
@@ -106,15 +106,15 @@ def dummyfun(result_gallery):
106
  return result_gallery[1]['name'] #+ ',' + result_gallery[1]['name'] #filename
107
 
108
  def create_demo(process, max_images=12):
109
- with gr.Blocks() as demo:
110
  with gr.Row():
111
  gr.Markdown('## Control Stable Diffusion with Segmentation Maps')
112
  with gr.Row():
113
  with gr.Column():
114
- input_image = gr.Image(source='upload', type='numpy')
115
  prompt = gr.Textbox(label='Prompt')
116
  run_button = gr.Button(label='Run')
117
- with gr.Accordion('Advanced options', open=False):
118
  num_samples = gr.Slider(label='Images',
119
  minimum=1,
120
  maximum=max_images,
 
106
  return result_gallery[1]['name'] #+ ',' + result_gallery[1]['name'] #filename
107
 
108
  def create_demo(process, max_images=12):
109
+ with gr.Blocks(css = "#input_image {width: 512px;} #out_image {width: 512px;}") as demo:
110
  with gr.Row():
111
  gr.Markdown('## Control Stable Diffusion with Segmentation Maps')
112
  with gr.Row():
113
  with gr.Column():
114
+ input_image = gr.Image(source='upload', type='numpy', elem_id='input_image')
115
  prompt = gr.Textbox(label='Prompt')
116
  run_button = gr.Button(label='Run')
117
+ with gr.Accordion('Advanced options', open=False, visible=False):
118
  num_samples = gr.Slider(label='Images',
119
  minimum=1,
120
  maximum=max_images,