Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,10 +68,13 @@ css = """
|
|
| 68 |
padding: 0 32px !important;
|
| 69 |
}
|
| 70 |
|
| 71 |
-
.main {
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
| 75 |
}
|
| 76 |
|
| 77 |
.dark {
|
|
@@ -389,17 +392,44 @@ input[type="range"] {
|
|
| 389 |
margin-right: auto;
|
| 390 |
}
|
| 391 |
|
| 392 |
-
/* Main Layout */
|
| 393 |
-
|
| 394 |
max-width: 1800px;
|
| 395 |
margin: 0 auto !important;
|
| 396 |
-
width: 100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 397 |
}
|
| 398 |
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 403 |
}
|
| 404 |
"""
|
| 405 |
|
|
@@ -652,9 +682,9 @@ with gr.Blocks(css=css, head=head, theme=gr.themes.Base(primary_hue="indigo"), d
|
|
| 652 |
</div>
|
| 653 |
""")
|
| 654 |
|
| 655 |
-
with gr.Row(equal_height=
|
| 656 |
# Left Panel — Input (span 1)
|
| 657 |
-
with gr.Column(scale=1, min_width=320):
|
| 658 |
|
| 659 |
# Image Upload
|
| 660 |
image_prompt = gr.Image(
|
|
@@ -670,7 +700,7 @@ with gr.Blocks(css=css, head=head, theme=gr.themes.Base(primary_hue="indigo"), d
|
|
| 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):
|
| 676 |
preview_output = gr.HTML(empty_html, label="3D Preview", show_label=False)
|
|
|
|
| 68 |
padding: 0 32px !important;
|
| 69 |
}
|
| 70 |
|
| 71 |
+
.gradio-container > .main {
|
| 72 |
+
gap: 0 !important;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.contain {
|
| 76 |
+
display: flex !important;
|
| 77 |
+
flex-direction: column !important;
|
| 78 |
}
|
| 79 |
|
| 80 |
.dark {
|
|
|
|
| 392 |
margin-right: auto;
|
| 393 |
}
|
| 394 |
|
| 395 |
+
/* Main Layout - Force side by side */
|
| 396 |
+
#main-row {
|
| 397 |
max-width: 1800px;
|
| 398 |
margin: 0 auto !important;
|
| 399 |
+
width: 100% !important;
|
| 400 |
+
display: flex !important;
|
| 401 |
+
flex-direction: row !important;
|
| 402 |
+
flex-wrap: nowrap !important;
|
| 403 |
+
gap: 32px !important;
|
| 404 |
+
align-items: flex-start !important;
|
| 405 |
}
|
| 406 |
|
| 407 |
+
#main-row.row {
|
| 408 |
+
flex-wrap: nowrap !important;
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
#input-col {
|
| 412 |
+
flex: 0 0 380px !important;
|
| 413 |
+
width: 380px !important;
|
| 414 |
+
min-width: 320px !important;
|
| 415 |
+
max-width: 420px !important;
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
#preview-col {
|
| 419 |
+
flex: 1 1 auto !important;
|
| 420 |
+
min-width: 0 !important;
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
@media (max-width: 900px) {
|
| 424 |
+
#main-row {
|
| 425 |
+
flex-direction: column !important;
|
| 426 |
+
}
|
| 427 |
+
#input-col,
|
| 428 |
+
#preview-col {
|
| 429 |
+
flex: 1 1 auto !important;
|
| 430 |
+
width: 100% !important;
|
| 431 |
+
max-width: 100% !important;
|
| 432 |
+
}
|
| 433 |
}
|
| 434 |
"""
|
| 435 |
|
|
|
|
| 682 |
</div>
|
| 683 |
""")
|
| 684 |
|
| 685 |
+
with gr.Row(equal_height=False, elem_id="main-row"):
|
| 686 |
# Left Panel — Input (span 1)
|
| 687 |
+
with gr.Column(scale=1, min_width=320, elem_id="input-col"):
|
| 688 |
|
| 689 |
# Image Upload
|
| 690 |
image_prompt = gr.Image(
|
|
|
|
| 700 |
generate_btn = gr.Button("Generate 3D", variant="primary", elem_classes=["primary-btn"], size="lg")
|
| 701 |
|
| 702 |
# Right Panel — Preview (span 2)
|
| 703 |
+
with gr.Column(scale=2, elem_id="preview-col"):
|
| 704 |
with gr.Walkthrough(selected=0) as walkthrough:
|
| 705 |
with gr.Step("Preview", id=0):
|
| 706 |
preview_output = gr.HTML(empty_html, label="3D Preview", show_label=False)
|