Spaces:
Sleeping
Sleeping
Commit ·
3a15319
1
Parent(s): aef1ad3
Restore ssr_mode=False and css in launch() for Gradio 6.x
Browse filesGradio 6.x SSR mode has a bug where /_app/immutable/* assets return
404, causing a blank page. ssr_mode=False avoids SSR entirely.
In Gradio 6.0+, css must be passed to launch(), not gr.Blocks().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -955,7 +955,7 @@ CLEAR_SVG = '<svg class="tb-svg" viewBox="0 0 24 24" fill="none" stroke="current
|
|
| 955 |
|
| 956 |
FIRE_LOGO_SVG = '<svg viewBox="0 0 24 24" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12 23c-3.6 0-8-2.69-8-7.5 0-3.5 3-6.5 4.5-8 .27-.27.75-.08.75.28v2.44c0 .42.5.63.72.28C12.28 7.5 13 3 13 1c0-.42.48-.64.8-.35C18 4.5 20 9 20 12c0 5.5-3.5 11-8 11z"/></svg>'
|
| 957 |
|
| 958 |
-
with gr.Blocks(
|
| 959 |
|
| 960 |
hidden_images_b64 = gr.Textbox(value="[]", elem_id="hidden-images-b64", elem_classes="hidden-input", container=False)
|
| 961 |
prompt = gr.Textbox(value="", elem_id="prompt-gradio-input", elem_classes="hidden-input", container=False)
|
|
@@ -1150,7 +1150,9 @@ with gr.Blocks(css=css) as demo:
|
|
| 1150 |
|
| 1151 |
if __name__ == "__main__":
|
| 1152 |
demo.queue(max_size=30).launch(
|
|
|
|
| 1153 |
mcp_server=True,
|
|
|
|
| 1154 |
show_error=True,
|
| 1155 |
allowed_paths=["examples"],
|
| 1156 |
)
|
|
|
|
| 955 |
|
| 956 |
FIRE_LOGO_SVG = '<svg viewBox="0 0 24 24" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12 23c-3.6 0-8-2.69-8-7.5 0-3.5 3-6.5 4.5-8 .27-.27.75-.08.75.28v2.44c0 .42.5.63.72.28C12.28 7.5 13 3 13 1c0-.42.48-.64.8-.35C18 4.5 20 9 20 12c0 5.5-3.5 11-8 11z"/></svg>'
|
| 957 |
|
| 958 |
+
with gr.Blocks() as demo:
|
| 959 |
|
| 960 |
hidden_images_b64 = gr.Textbox(value="[]", elem_id="hidden-images-b64", elem_classes="hidden-input", container=False)
|
| 961 |
prompt = gr.Textbox(value="", elem_id="prompt-gradio-input", elem_classes="hidden-input", container=False)
|
|
|
|
| 1150 |
|
| 1151 |
if __name__ == "__main__":
|
| 1152 |
demo.queue(max_size=30).launch(
|
| 1153 |
+
css=css,
|
| 1154 |
mcp_server=True,
|
| 1155 |
+
ssr_mode=False,
|
| 1156 |
show_error=True,
|
| 1157 |
allowed_paths=["examples"],
|
| 1158 |
)
|