akhaliq HF staff commited on
Commit
0febc31
1 Parent(s): fc22125

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -38
app.py CHANGED
@@ -105,44 +105,6 @@ with gr.Blocks(css=css) as demo:
105
  </div>
106
  """
107
  )
108
- with gr.Row():
109
-
110
- with gr.Column(scale=55):
111
- with gr.Group():
112
- with gr.Row():
113
- prompt = gr.Textbox(label="Prompt", show_label=False, max_lines=2,placeholder=f"{prefix} [your prompt]").style(container=False)
114
- generate = gr.Button(value="Generate").style(rounded=(False, True, True, False))
115
-
116
- image_out = gr.Image(height=512)
117
- error_output = gr.Markdown()
118
-
119
- with gr.Column(scale=45):
120
- with gr.Tab("Options"):
121
- with gr.Group():
122
- neg_prompt = gr.Textbox(label="Negative prompt", placeholder="What to exclude from the image")
123
- auto_prefix = gr.Checkbox(label="Prefix styling tokens automatically ()", value=True)
124
-
125
- with gr.Row():
126
- guidance = gr.Slider(label="Guidance scale", value=7.5, maximum=15)
127
- steps = gr.Slider(label="Steps", value=25, minimum=2, maximum=75, step=1)
128
-
129
- with gr.Row():
130
- width = gr.Slider(label="Width", value=512, minimum=64, maximum=1024, step=8)
131
- height = gr.Slider(label="Height", value=512, minimum=64, maximum=1024, step=8)
132
-
133
- seed = gr.Slider(0, 2147483647, label='Seed (0 = random)', value=0, step=1)
134
-
135
- with gr.Tab("Image to image"):
136
- with gr.Group():
137
- image = gr.Image(label="Image", height=256, tool="editor", type="pil")
138
- strength = gr.Slider(label="Transformation strength", minimum=0, maximum=1, step=0.01, value=0.5)
139
-
140
- auto_prefix.change(lambda x: gr.update(placeholder=f"{prefix} [your prompt]" if x else "[Your prompt]"), inputs=auto_prefix, outputs=prompt, queue=False)
141
-
142
- inputs = [prompt, guidance, steps, width, height, seed, image, strength, neg_prompt, auto_prefix]
143
- outputs = [image_out, error_output]
144
- prompt.submit(inference, inputs=inputs, outputs=outputs)
145
- generate.click(inference, inputs=inputs, outputs=outputs)
146
 
147
 
148
  with gr.Row():
 
105
  </div>
106
  """
107
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
 
109
 
110
  with gr.Row():