Spaces:
Paused
Paused
Update app.py
Browse files227 unmodified lines2282292302312322332342352362372382392402412422432442452462472482492 unmodified lines252253254255256257258259260261262263227 unmodified lines"""Create Gradio interface"""with gr.Blocks(theme=gr.themes.Soft()) as demo:gr.Markdown("# PosterCraft-v1_RL")with gr.Row():with gr.Column(scale=1):gr.Markdown("### 1. Configuration")prompt_input = gr.Textbox(label="Prompt",lines=3,placeholder="Enter your creative prompt...",value="Retro sci-fi movie poster with neon colors and flying cars")enable_recap_checkbox = gr.Checkbox(label="Enable Prompt Recap",value=True,info=f"Uses {DEFAULT_QWEN_MODEL_PATH} for rewriting.")with gr.Row():width_input = gr.Slider(label="Width", minimum=256, maximum=2048, value=832, step=64)2 unmodified linesnum_inference_steps_input = gr.Slider(label="Inference Steps", minimum=1, maximum=100, value=28, step=1)guidance_scale_input = gr.Slider(label="Guidance Scale (CFG)", minimum=0.0, maximum=20.0, value=3.5, step=0.1)seed_number_input = gr.Number(label="Seed", value=None, minimum=-1, step=1, info="Leave blank or set to -1 for a random seed.")generate_button = gr.Button("Generate Image", variant="primary")with gr.Column(scale=1):gr.Markdown("### 2. Results")image_output = gr.Image(label="Generated Image", type="pil", show_download_button=True, height=250, width=200)recapped_prompt_output = gr.Textbox(label="Final Prompt Used", lines=5, interactive=False)status_output = gr.Textbox(label="Status Log", lines=4, interactive=False)227 unmodified lines2282292302312322332342352362372382392402 unmodified lines243244245246247248249250251252253254227 unmodified lines"""Create Gradio interface"""with gr.Blocks(theme=gr.themes.Soft()) as demo:gr.Markdown("<div style='text-align: center;'><h1>PosterCraft-v1.0</h1></div>")with gr.Row():with gr.Column(scale=1):gr.Markdown("### 1. Configuration")prompt_input = gr.Textbox(label="Prompt", lines=3, placeholder="Enter your creative prompt...")enable_recap_checkbox = gr.Checkbox(label="Enable Prompt Recap", value=True, info=f"Uses {DEFAULT_QWEN_MODEL_PATH} for rewriting.")with gr.Row():width_input = gr.Slider(label="Width", minimum=256, maximum=2048, value=832, step=64)2 unmodified linesnum_inference_steps_input = gr.Slider(label="Inference Steps", minimum=1, maximum=100, value=28, step=1)guidance_scale_input = gr.Slider(label="Guidance Scale (CFG)", minimum=0.0, maximum=20.0, value=3.5, step=0.1)seed_number_input = gr.Number(label="Seed", value=-1, minimum=-1, step=1, info="Leave blank or set to -1 for a random seed.")generate_button = gr.Button("Generate Image", variant="primary")with gr.Column(scale=1):gr.Markdown("### 2. Results")image_output = gr.Image(label="Generated Image", type="pil", show_download_button=True, height=512)recapped_prompt_output = gr.Textbox(label="Final Prompt Used", lines=5, interactive=False)status_output = gr.Textbox(label="Status Log", lines=4, interactive=False)
app.py+5-14