Shaoan commited on
Commit
5c693f5
Β·
verified Β·
1 Parent(s): 3b895b3

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -180,7 +180,7 @@ def reset_history():
180
  css = """
181
  #col-container {
182
  margin: 0 auto;
183
- max-width: 1200px;
184
  }
185
  """
186
 
@@ -194,17 +194,15 @@ with gr.Blocks(css=css, title="ConceptAligner") as demo:
194
 
195
  with gr.Row():
196
  with gr.Column(scale=1):
197
- prompt_input = gr.Text(
198
  label="Prompt",
199
- show_label=False,
200
- max_lines=3,
201
- placeholder="Describe your image...",
202
- container=False,
203
  )
204
 
205
  with gr.Row():
206
  generate_btn = gr.Button("✨ Generate", variant="primary", scale=3)
207
- reset_btn = gr.Button("πŸ”„ Clear", variant="secondary", scale=1)
208
 
209
  with gr.Accordion("βš™οΈ Settings", open=False):
210
  seed = gr.Slider(
@@ -216,19 +214,21 @@ with gr.Blocks(css=css, title="ConceptAligner") as demo:
216
  )
217
 
218
  guidance_scale = gr.Slider(
219
- label="Creativity Level",
220
  minimum=1.0,
221
  maximum=10.0,
222
  step=0.5,
223
  value=3.5,
 
224
  )
225
 
226
  num_inference_steps = gr.Slider(
227
- label="Quality (steps)",
228
  minimum=10,
229
  maximum=50,
230
  step=1,
231
  value=20,
 
232
  )
233
 
234
  with gr.Row():
@@ -263,17 +263,17 @@ with gr.Blocks(css=css, title="ConceptAligner") as demo:
263
  with gr.Row():
264
  with gr.Column():
265
  gr.Markdown("**Previous**")
266
- prev_image = gr.Image(label="Previous", show_label=False, type="pil", height=400)
267
  prev_prompt_display = gr.Textbox(
268
  label="Previous Prompt",
269
- lines=2,
270
  interactive=False,
271
  show_label=False
272
  )
273
 
274
  with gr.Column():
275
  gr.Markdown("**Latest**")
276
- current_image = gr.Image(label="Current", show_label=False, type="pil", height=400)
277
 
278
  gr.Markdown("### πŸ“ Try This Example")
279
  gr.Examples(
 
180
  css = """
181
  #col-container {
182
  margin: 0 auto;
183
+ max-width: 1400px;
184
  }
185
  """
186
 
 
194
 
195
  with gr.Row():
196
  with gr.Column(scale=1):
197
+ prompt_input = gr.Textbox(
198
  label="Prompt",
199
+ lines=8,
200
+ placeholder="Describe your image in detail...",
 
 
201
  )
202
 
203
  with gr.Row():
204
  generate_btn = gr.Button("✨ Generate", variant="primary", scale=3)
205
+ reset_btn = gr.Button("πŸ”„ Clear History", variant="secondary", scale=1)
206
 
207
  with gr.Accordion("βš™οΈ Settings", open=False):
208
  seed = gr.Slider(
 
214
  )
215
 
216
  guidance_scale = gr.Slider(
217
+ label="Guidance Scale",
218
  minimum=1.0,
219
  maximum=10.0,
220
  step=0.5,
221
  value=3.5,
222
+ info="Higher = follows prompt more closely (3-4 recommended)"
223
  )
224
 
225
  num_inference_steps = gr.Slider(
226
+ label="Number of Steps",
227
  minimum=10,
228
  maximum=50,
229
  step=1,
230
  value=20,
231
+ info="More steps = higher quality but slower"
232
  )
233
 
234
  with gr.Row():
 
263
  with gr.Row():
264
  with gr.Column():
265
  gr.Markdown("**Previous**")
266
+ prev_image = gr.Image(label="Previous", show_label=False, type="pil", height=450)
267
  prev_prompt_display = gr.Textbox(
268
  label="Previous Prompt",
269
+ lines=3,
270
  interactive=False,
271
  show_label=False
272
  )
273
 
274
  with gr.Column():
275
  gr.Markdown("**Latest**")
276
+ current_image = gr.Image(label="Current", show_label=False, type="pil", height=450)
277
 
278
  gr.Markdown("### πŸ“ Try This Example")
279
  gr.Examples(