Spaces:
Paused
Paused
Update app.py
Browse files309 unmodified lines31031131231331431531640 unmodified lines357358359360361362363309 unmodified lineswith gr.Row(equal_height=True) as main_row:# 왼쪽 입력 컬럼with gr.Column(elem_id="input-column", scale=1):with gr.Box(elem_classes="input-box"):prompt = gr.Text(label="Diagram Prompt",placeholder="Enter your diagram structure...",40 unmodified lineswith gr.Column(elem_id="examples-column", scale=1):gr.Markdown("### Example Diagrams")for example in EXAMPLES:with gr.Box(elem_classes="example-card"):gr.Markdown(f"#### {example['title']}")gr.Markdown(f"```\n{example['prompt']}\n```")if gr.Button("Use This Example", size="sm"):309 unmodified lines31031131231331431531640 unmodified lines357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431309 unmodified lineswith gr.Row(equal_height=True) as main_row:# 왼쪽 입력 컬럼with gr.Column(elem_id="input-column", scale=1):with gr.Group(elem_classes="input-box"): # Box를 Group으로 변경prompt = gr.Text(label="Diagram Prompt",placeholder="Enter your diagram structure...",40 unmodified lineswith gr.Column(elem_id="examples-column", scale=1):gr.Markdown("### Example Diagrams")for example in EXAMPLES:with gr.Group(elem_classes="example-card"): # Box를 Group으로 변경gr.Markdown(f"#### {example['title']}")gr.Markdown(f"```\n{example['prompt']}\n```")if gr.Button("Use This Example", size="sm"):prompt.update(value=example['prompt'])width.update(value=example['width'])height.update(value=example['height'])# Gradio 인터페이스 수정with gr.Blocks(css=css) as demo:gr.Markdown("""<div class="title">FLUX Diagram Generator</div><div class="subtitle">Create beautiful hand-drawn style diagrams using FLUX AI</div>""")gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Faiqcamp-diagram.hf.space"><img src="https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Faiqcamp-diagram.hf.space&countColor=%23263759" /></a>""")with gr.Row(equal_height=True) as main_row:# 왼쪽 입력 컬럼with gr.Column(elem_id="input-column", scale=1):with gr.Group(elem_classes="input-box"): # Box를 Group으로 변경prompt = gr.Text(label="Diagram Prompt",placeholder="Enter your diagram structure...",lines=5)run_button = gr.Button("Generate Diagram", variant="primary")result = gr.Image(label="Generated Diagram")with gr.Accordion("Advanced Settings", open=False):seed = gr.Slider(label="Seed",minimum=0,maximum=MAX_SEED,step=1,value=0,)randomize_seed = gr.Checkbox(label="Randomize seed", value=True)with gr.Row():width = gr.Slider(label="Width",minimum=256,maximum=MAX_IMAGE_SIZE,step=32,value=1024,)height = gr.Slider(label="Height",minimum=256,maximum=MAX_IMAGE_SIZE,step=32,value=1024,)num_inference_steps = gr.Slider(label="Number of inference steps",minimum=1,maximum=50,step=1,value=4,)# 오른쪽 예제 컬럼with gr.Column(elem_id="examples-column", scale=1):gr.Markdown("### Example Diagrams")for example in EXAMPLES:with gr.Group(elem_classes="example-card"): # Box를 Group으로 변경gr.Markdown(f"#### {example['title']}")gr.Markdown(f"```\n{example['prompt']}\n```")if gr.Button("Use This Example", size="sm"):
app.py+70-2