Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,9 +63,9 @@ css = """
|
|
| 63 |
/* Global Overrides */
|
| 64 |
.gradio-container {
|
| 65 |
background: var(--surface-0) !important;
|
| 66 |
-
max-width:
|
| 67 |
margin: 0 auto !important;
|
| 68 |
-
padding: 0
|
| 69 |
}
|
| 70 |
|
| 71 |
.main {
|
|
@@ -87,7 +87,7 @@ css = """
|
|
| 87 |
padding: 48px 20px 36px;
|
| 88 |
border-bottom: 1px solid var(--border);
|
| 89 |
margin-bottom: 32px;
|
| 90 |
-
max-width:
|
| 91 |
margin-left: auto;
|
| 92 |
margin-right: auto;
|
| 93 |
}
|
|
@@ -234,12 +234,12 @@ input[type="range"] {
|
|
| 234 |
.previewer-container {
|
| 235 |
position: relative;
|
| 236 |
width: 100%;
|
| 237 |
-
height:
|
| 238 |
display: flex;
|
| 239 |
flex-direction: column;
|
| 240 |
align-items: center;
|
| 241 |
justify-content: center;
|
| 242 |
-
padding:
|
| 243 |
background: radial-gradient(ellipse at center, var(--surface-2) 0%, var(--surface-1) 100%);
|
| 244 |
border-radius: var(--radius);
|
| 245 |
}
|
|
@@ -384,14 +384,14 @@ input[type="range"] {
|
|
| 384 |
padding: 20px;
|
| 385 |
border-top: 1px solid var(--border);
|
| 386 |
margin-top: 32px;
|
| 387 |
-
max-width:
|
| 388 |
margin-left: auto;
|
| 389 |
margin-right: auto;
|
| 390 |
}
|
| 391 |
|
| 392 |
/* Main Layout */
|
| 393 |
.main-row {
|
| 394 |
-
max-width:
|
| 395 |
margin: 0 auto !important;
|
| 396 |
width: 100%;
|
| 397 |
}
|
|
@@ -653,8 +653,8 @@ with gr.Blocks(css=css, head=head, theme=gr.themes.Base(primary_hue="indigo"), d
|
|
| 653 |
""")
|
| 654 |
|
| 655 |
with gr.Row(equal_height=True, elem_classes=["main-row"]):
|
| 656 |
-
# Left Panel —
|
| 657 |
-
with gr.Column(scale=1, min_width=
|
| 658 |
|
| 659 |
# Image Upload
|
| 660 |
image_prompt = gr.Image(
|
|
@@ -662,14 +662,14 @@ with gr.Blocks(css=css, head=head, theme=gr.themes.Base(primary_hue="indigo"), d
|
|
| 662 |
format="png",
|
| 663 |
image_mode="RGBA",
|
| 664 |
type="pil",
|
| 665 |
-
height=
|
| 666 |
elem_classes=["upload-zone"]
|
| 667 |
)
|
| 668 |
|
| 669 |
# Generate Button
|
| 670 |
generate_btn = gr.Button("Generate 3D", variant="primary", elem_classes=["primary-btn"], size="lg")
|
| 671 |
|
| 672 |
-
# Right Panel — Preview
|
| 673 |
with gr.Column(scale=2):
|
| 674 |
with gr.Walkthrough(selected=0) as walkthrough:
|
| 675 |
with gr.Step("Preview", id=0):
|
|
@@ -679,7 +679,7 @@ with gr.Blocks(css=css, head=head, theme=gr.themes.Base(primary_hue="indigo"), d
|
|
| 679 |
with gr.Step("Export", id=1):
|
| 680 |
glb_output = gr.Model3D(
|
| 681 |
label="GLB Model",
|
| 682 |
-
height=
|
| 683 |
show_label=False,
|
| 684 |
display_mode="solid",
|
| 685 |
clear_color=(0.06, 0.06, 0.07, 1.0)
|
|
|
|
| 63 |
/* Global Overrides */
|
| 64 |
.gradio-container {
|
| 65 |
background: var(--surface-0) !important;
|
| 66 |
+
max-width: 1800px !important;
|
| 67 |
margin: 0 auto !important;
|
| 68 |
+
padding: 0 32px !important;
|
| 69 |
}
|
| 70 |
|
| 71 |
.main {
|
|
|
|
| 87 |
padding: 48px 20px 36px;
|
| 88 |
border-bottom: 1px solid var(--border);
|
| 89 |
margin-bottom: 32px;
|
| 90 |
+
max-width: 1800px;
|
| 91 |
margin-left: auto;
|
| 92 |
margin-right: auto;
|
| 93 |
}
|
|
|
|
| 234 |
.previewer-container {
|
| 235 |
position: relative;
|
| 236 |
width: 100%;
|
| 237 |
+
height: 720px;
|
| 238 |
display: flex;
|
| 239 |
flex-direction: column;
|
| 240 |
align-items: center;
|
| 241 |
justify-content: center;
|
| 242 |
+
padding: 24px;
|
| 243 |
background: radial-gradient(ellipse at center, var(--surface-2) 0%, var(--surface-1) 100%);
|
| 244 |
border-radius: var(--radius);
|
| 245 |
}
|
|
|
|
| 384 |
padding: 20px;
|
| 385 |
border-top: 1px solid var(--border);
|
| 386 |
margin-top: 32px;
|
| 387 |
+
max-width: 1800px;
|
| 388 |
margin-left: auto;
|
| 389 |
margin-right: auto;
|
| 390 |
}
|
| 391 |
|
| 392 |
/* Main Layout */
|
| 393 |
.main-row {
|
| 394 |
+
max-width: 1800px;
|
| 395 |
margin: 0 auto !important;
|
| 396 |
width: 100%;
|
| 397 |
}
|
|
|
|
| 653 |
""")
|
| 654 |
|
| 655 |
with gr.Row(equal_height=True, elem_classes=["main-row"]):
|
| 656 |
+
# Left Panel — Input (span 1)
|
| 657 |
+
with gr.Column(scale=1, min_width=320):
|
| 658 |
|
| 659 |
# Image Upload
|
| 660 |
image_prompt = gr.Image(
|
|
|
|
| 662 |
format="png",
|
| 663 |
image_mode="RGBA",
|
| 664 |
type="pil",
|
| 665 |
+
height=400,
|
| 666 |
elem_classes=["upload-zone"]
|
| 667 |
)
|
| 668 |
|
| 669 |
# Generate Button
|
| 670 |
generate_btn = gr.Button("Generate 3D", variant="primary", elem_classes=["primary-btn"], size="lg")
|
| 671 |
|
| 672 |
+
# Right Panel — Preview (span 2)
|
| 673 |
with gr.Column(scale=2):
|
| 674 |
with gr.Walkthrough(selected=0) as walkthrough:
|
| 675 |
with gr.Step("Preview", id=0):
|
|
|
|
| 679 |
with gr.Step("Export", id=1):
|
| 680 |
glb_output = gr.Model3D(
|
| 681 |
label="GLB Model",
|
| 682 |
+
height=640,
|
| 683 |
show_label=False,
|
| 684 |
display_mode="solid",
|
| 685 |
clear_color=(0.06, 0.06, 0.07, 1.0)
|