Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
7509a37
1
Parent(s):
a3f8eb0
Match Qwen-Image Gradio 6 structure exactly
Browse files- Move theme, css to demo.launch()
- Remove head parameter (Qwen-Image doesn't use it)
- Keep JS via demo.load()
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- app_diffusers.py +33 -32
app_diffusers.py
CHANGED
|
@@ -548,40 +548,38 @@ def infer(
|
|
| 548 |
|
| 549 |
return image, seed
|
| 550 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 551 |
with gr.Blocks(
|
| 552 |
title="Ovis-Image",
|
| 553 |
fill_height=False,
|
| 554 |
-
theme=gr.themes.Soft(
|
| 555 |
-
primary_hue=gr.themes.colors.blue,
|
| 556 |
-
secondary_hue=gr.themes.colors.slate,
|
| 557 |
-
neutral_hue=gr.themes.colors.gray,
|
| 558 |
-
spacing_size=gr.themes.sizes.spacing_lg,
|
| 559 |
-
radius_size=gr.themes.sizes.radius_lg,
|
| 560 |
-
text_size=gr.themes.sizes.text_md,
|
| 561 |
-
font=[gr.themes.GoogleFont("Inter"), "SF Pro Display", "-apple-system", "BlinkMacSystemFont", "system-ui", "sans-serif"],
|
| 562 |
-
font_mono=[gr.themes.GoogleFont("JetBrains Mono"), "SF Mono", "ui-monospace", "monospace"],
|
| 563 |
-
).set(
|
| 564 |
-
body_background_fill='#f5f5f7',
|
| 565 |
-
body_background_fill_dark='#000000',
|
| 566 |
-
button_primary_background_fill='#0071e3',
|
| 567 |
-
button_primary_background_fill_hover='#0077ed',
|
| 568 |
-
button_primary_text_color='#ffffff',
|
| 569 |
-
block_background_fill='#ffffff',
|
| 570 |
-
block_background_fill_dark='#1d1d1f',
|
| 571 |
-
block_border_width='0px',
|
| 572 |
-
block_shadow='0 2px 12px rgba(0, 0, 0, 0.08)',
|
| 573 |
-
block_shadow_dark='0 2px 12px rgba(0, 0, 0, 0.4)',
|
| 574 |
-
input_background_fill='#ffffff',
|
| 575 |
-
input_background_fill_dark='#1d1d1f',
|
| 576 |
-
input_border_width='1px',
|
| 577 |
-
input_border_color='#d2d2d7',
|
| 578 |
-
input_border_color_dark='#424245',
|
| 579 |
-
input_shadow='none',
|
| 580 |
-
input_shadow_focus='0 0 0 4px rgba(0, 113, 227, 0.15)',
|
| 581 |
-
),
|
| 582 |
-
css=apple_css,
|
| 583 |
-
head="""<style>body{background:#fff!important;visibility:hidden}</style>
|
| 584 |
-
<script>setTimeout(function(){document.body.style.visibility='visible';document.body.style.background=''},100)</script>""",
|
| 585 |
) as demo:
|
| 586 |
# Two-column layout - variant='panel' prevents responsive stacking
|
| 587 |
with gr.Row(equal_height=False, variant="panel", elem_id="main-row"):
|
|
@@ -681,4 +679,7 @@ with gr.Blocks(
|
|
| 681 |
demo.load(None, None, None, js=js_code)
|
| 682 |
|
| 683 |
if __name__ == '__main__':
|
| 684 |
-
demo.launch(
|
|
|
|
|
|
|
|
|
|
|
|
| 548 |
|
| 549 |
return image, seed
|
| 550 |
|
| 551 |
+
custom_theme = gr.themes.Soft(
|
| 552 |
+
primary_hue=gr.themes.colors.blue,
|
| 553 |
+
secondary_hue=gr.themes.colors.slate,
|
| 554 |
+
neutral_hue=gr.themes.colors.gray,
|
| 555 |
+
spacing_size=gr.themes.sizes.spacing_lg,
|
| 556 |
+
radius_size=gr.themes.sizes.radius_lg,
|
| 557 |
+
text_size=gr.themes.sizes.text_md,
|
| 558 |
+
font=[gr.themes.GoogleFont("Inter"), "SF Pro Display", "-apple-system", "BlinkMacSystemFont", "system-ui", "sans-serif"],
|
| 559 |
+
font_mono=[gr.themes.GoogleFont("JetBrains Mono"), "SF Mono", "ui-monospace", "monospace"],
|
| 560 |
+
).set(
|
| 561 |
+
body_background_fill='#f5f5f7',
|
| 562 |
+
body_background_fill_dark='#000000',
|
| 563 |
+
button_primary_background_fill='#0071e3',
|
| 564 |
+
button_primary_background_fill_hover='#0077ed',
|
| 565 |
+
button_primary_text_color='#ffffff',
|
| 566 |
+
block_background_fill='#ffffff',
|
| 567 |
+
block_background_fill_dark='#1d1d1f',
|
| 568 |
+
block_border_width='0px',
|
| 569 |
+
block_shadow='0 2px 12px rgba(0, 0, 0, 0.08)',
|
| 570 |
+
block_shadow_dark='0 2px 12px rgba(0, 0, 0, 0.4)',
|
| 571 |
+
input_background_fill='#ffffff',
|
| 572 |
+
input_background_fill_dark='#1d1d1f',
|
| 573 |
+
input_border_width='1px',
|
| 574 |
+
input_border_color='#d2d2d7',
|
| 575 |
+
input_border_color_dark='#424245',
|
| 576 |
+
input_shadow='none',
|
| 577 |
+
input_shadow_focus='0 0 0 4px rgba(0, 113, 227, 0.15)',
|
| 578 |
+
)
|
| 579 |
+
|
| 580 |
with gr.Blocks(
|
| 581 |
title="Ovis-Image",
|
| 582 |
fill_height=False,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 583 |
) as demo:
|
| 584 |
# Two-column layout - variant='panel' prevents responsive stacking
|
| 585 |
with gr.Row(equal_height=False, variant="panel", elem_id="main-row"):
|
|
|
|
| 679 |
demo.load(None, None, None, js=js_code)
|
| 680 |
|
| 681 |
if __name__ == '__main__':
|
| 682 |
+
demo.launch(
|
| 683 |
+
theme=custom_theme,
|
| 684 |
+
css=apple_css,
|
| 685 |
+
)
|