ChenWu98 commited on
Commit
4527b8b
1 Parent(s): 1a81e27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -73,11 +73,9 @@ with gr.Blocks(css=css) as demo:
73
  with gr.Column(scale=55):
74
  with gr.Group():
75
 
76
- with gr.Row():
77
- generate = gr.Button(value="Generate").style(rounded=(False, True, True, False))
78
- img = gr.Image(label="Source image", height=256, tool="editor", type="pil")
79
 
80
- image_out = gr.Image(height=512)
81
  # gallery = gr.Gallery(
82
  # label="Generated images", show_label=False, elem_id="gallery"
83
  # ).style(grid=[1], height="auto")
@@ -85,8 +83,8 @@ with gr.Blocks(css=css) as demo:
85
  with gr.Column(scale=45):
86
  with gr.Tab("Options"):
87
  with gr.Group():
88
- source_prompt = gr.Textbox(label="Source prompt", placeholder="Source prompt describes the input image")
89
- target_prompt = gr.Textbox(label="Target prompt", placeholder="Target prompt describes the output image")
90
 
91
  with gr.Row():
92
  source_guidance_scale = gr.Slider(label="Source guidance scale", value=1, minimum=1, maximum=10)
@@ -100,7 +98,11 @@ with gr.Blocks(css=css) as demo:
100
  width = gr.Slider(label="Width", value=512, minimum=64, maximum=1024, step=8)
101
  height = gr.Slider(label="Height", value=512, minimum=64, maximum=1024, step=8)
102
 
103
- seed = gr.Slider(0, 2147483647, label='Seed', value=0, step=1)
 
 
 
 
104
 
105
  inputs = [source_prompt, target_prompt, source_guidance_scale, guidance_scale, num_inference_steps,
106
  width, height, seed, img, strength]
 
73
  with gr.Column(scale=55):
74
  with gr.Group():
75
 
76
+ img = gr.Image(label="Input image", height=512, tool="editor", type="pil")
 
 
77
 
78
+ image_out = gr.Image(label="Output image", height=512)
79
  # gallery = gr.Gallery(
80
  # label="Generated images", show_label=False, elem_id="gallery"
81
  # ).style(grid=[1], height="auto")
 
83
  with gr.Column(scale=45):
84
  with gr.Tab("Options"):
85
  with gr.Group():
86
+ source_prompt = gr.Textbox(label="Source prompt", placeholder="Source prompt describes the input image").style(rounded=(False, True, True, False))
87
+ target_prompt = gr.Textbox(label="Target prompt", placeholder="Target prompt describes the output image").style(rounded=(True, False, False, True))
88
 
89
  with gr.Row():
90
  source_guidance_scale = gr.Slider(label="Source guidance scale", value=1, minimum=1, maximum=10)
 
98
  width = gr.Slider(label="Width", value=512, minimum=64, maximum=1024, step=8)
99
  height = gr.Slider(label="Height", value=512, minimum=64, maximum=1024, step=8)
100
 
101
+ with gr.Row():
102
+ seed = gr.Slider(0, 2147483647, label='Seed', value=0, step=1)
103
+
104
+ with gr.Row():
105
+ generate = gr.Button(value="Edit").style(rounded=(True, True, True, True))
106
 
107
  inputs = [source_prompt, target_prompt, source_guidance_scale, guidance_scale, num_inference_steps,
108
  width, height, seed, img, strength]