Ephemeral182 commited on
Commit
a7e43e2
·
verified ·
1 Parent(s): f2b4700

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -14
app.py CHANGED
@@ -228,22 +228,13 @@ def create_interface():
228
  """Create Gradio interface"""
229
 
230
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
231
- gr.Markdown("# PosterCraft-v1_RL")
232
 
233
  with gr.Row():
234
  with gr.Column(scale=1):
235
  gr.Markdown("### 1. Configuration")
236
- prompt_input = gr.Textbox(
237
- label="Prompt",
238
- lines=3,
239
- placeholder="Enter your creative prompt...",
240
- value="Retro sci-fi movie poster with neon colors and flying cars"
241
- )
242
- enable_recap_checkbox = gr.Checkbox(
243
- label="Enable Prompt Recap",
244
- value=True,
245
- info=f"Uses {DEFAULT_QWEN_MODEL_PATH} for rewriting."
246
- )
247
 
248
  with gr.Row():
249
  width_input = gr.Slider(label="Width", minimum=256, maximum=2048, value=832, step=64)
@@ -252,12 +243,12 @@ def create_interface():
252
 
253
  num_inference_steps_input = gr.Slider(label="Inference Steps", minimum=1, maximum=100, value=28, step=1)
254
  guidance_scale_input = gr.Slider(label="Guidance Scale (CFG)", minimum=0.0, maximum=20.0, value=3.5, step=0.1)
255
- seed_number_input = gr.Number(label="Seed", value=None, minimum=-1, step=1, info="Leave blank or set to -1 for a random seed.")
256
  generate_button = gr.Button("Generate Image", variant="primary")
257
 
258
  with gr.Column(scale=1):
259
  gr.Markdown("### 2. Results")
260
- image_output = gr.Image(label="Generated Image", type="pil", show_download_button=True, height=250, width=200)
261
  recapped_prompt_output = gr.Textbox(label="Final Prompt Used", lines=5, interactive=False)
262
  status_output = gr.Textbox(label="Status Log", lines=4, interactive=False)
263
 
 
228
  """Create Gradio interface"""
229
 
230
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
231
+ gr.Markdown("<div style='text-align: center;'><h1>PosterCraft-v1.0</h1></div>")
232
 
233
  with gr.Row():
234
  with gr.Column(scale=1):
235
  gr.Markdown("### 1. Configuration")
236
+ prompt_input = gr.Textbox(label="Prompt", lines=3, placeholder="Enter your creative prompt...")
237
+ enable_recap_checkbox = gr.Checkbox(label="Enable Prompt Recap", value=True, info=f"Uses {DEFAULT_QWEN_MODEL_PATH} for rewriting.")
 
 
 
 
 
 
 
 
 
238
 
239
  with gr.Row():
240
  width_input = gr.Slider(label="Width", minimum=256, maximum=2048, value=832, step=64)
 
243
 
244
  num_inference_steps_input = gr.Slider(label="Inference Steps", minimum=1, maximum=100, value=28, step=1)
245
  guidance_scale_input = gr.Slider(label="Guidance Scale (CFG)", minimum=0.0, maximum=20.0, value=3.5, step=0.1)
246
+ seed_number_input = gr.Number(label="Seed", value=-1, minimum=-1, step=1, info="Leave blank or set to -1 for a random seed.")
247
  generate_button = gr.Button("Generate Image", variant="primary")
248
 
249
  with gr.Column(scale=1):
250
  gr.Markdown("### 2. Results")
251
+ image_output = gr.Image(label="Generated Image", type="pil", show_download_button=True, height=512)
252
  recapped_prompt_output = gr.Textbox(label="Final Prompt Used", lines=5, interactive=False)
253
  status_output = gr.Textbox(label="Status Log", lines=4, interactive=False)
254