Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -704,16 +704,16 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
| 704 |
with gr.Column(scale=1):
|
| 705 |
image = gr.Image(label="Input Image", type="pil", height=300)
|
| 706 |
|
| 707 |
-
gr.Markdown("###
|
| 708 |
gr.Markdown("*Drag the colored handles: 🔵 Azimuth (Direction), 🔴 Elevation (Height)*")
|
| 709 |
|
| 710 |
lighting_3d = LightingControl3D(
|
| 711 |
value={"azimuth": 0, "elevation": 0},
|
| 712 |
elem_id="lighting-3d-control"
|
| 713 |
)
|
| 714 |
-
run_btn = gr.Button("
|
| 715 |
|
| 716 |
-
gr.Markdown("###
|
| 717 |
|
| 718 |
azimuth_slider = gr.Slider(
|
| 719 |
label="Azimuth (Horizontal Rotation)",
|
|
@@ -732,18 +732,20 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
| 732 |
value=0,
|
| 733 |
info="-90°=from below, 0°=horizontal, 90°=from above"
|
| 734 |
)
|
| 735 |
-
|
| 736 |
-
|
| 737 |
-
|
| 738 |
-
|
| 739 |
-
|
| 740 |
-
|
|
|
|
|
|
|
| 741 |
|
| 742 |
# Right column: Output
|
| 743 |
with gr.Column(scale=1):
|
| 744 |
result = gr.Image(label="Output Image", height=500)
|
| 745 |
|
| 746 |
-
with gr.Accordion("
|
| 747 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0)
|
| 748 |
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
| 749 |
guidance_scale = gr.Slider(label="Guidance Scale", minimum=1.0, maximum=10.0, step=0.1, value=1.0)
|
|
|
|
| 704 |
with gr.Column(scale=1):
|
| 705 |
image = gr.Image(label="Input Image", type="pil", height=300)
|
| 706 |
|
| 707 |
+
gr.Markdown("### 3D Lighting Control")
|
| 708 |
gr.Markdown("*Drag the colored handles: 🔵 Azimuth (Direction), 🔴 Elevation (Height)*")
|
| 709 |
|
| 710 |
lighting_3d = LightingControl3D(
|
| 711 |
value={"azimuth": 0, "elevation": 0},
|
| 712 |
elem_id="lighting-3d-control"
|
| 713 |
)
|
| 714 |
+
run_btn = gr.Button("Generate Image", variant="primary", size="lg")
|
| 715 |
|
| 716 |
+
gr.Markdown("### Slider Controls")
|
| 717 |
|
| 718 |
azimuth_slider = gr.Slider(
|
| 719 |
label="Azimuth (Horizontal Rotation)",
|
|
|
|
| 732 |
value=0,
|
| 733 |
info="-90°=from below, 0°=horizontal, 90°=from above"
|
| 734 |
)
|
| 735 |
+
|
| 736 |
+
with gr.Row():
|
| 737 |
+
prompt_preview = gr.Textbox(
|
| 738 |
+
label="Generated Prompt",
|
| 739 |
+
value="Light source from the Front",
|
| 740 |
+
interactive=True,
|
| 741 |
+
lines=3,
|
| 742 |
+
)
|
| 743 |
|
| 744 |
# Right column: Output
|
| 745 |
with gr.Column(scale=1):
|
| 746 |
result = gr.Image(label="Output Image", height=500)
|
| 747 |
|
| 748 |
+
with gr.Accordion("Advanced Settings", open=False):
|
| 749 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0)
|
| 750 |
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
| 751 |
guidance_scale = gr.Slider(label="Guidance Scale", minimum=1.0, maximum=10.0, step=0.1, value=1.0)
|