Spaces:
Running
Running
Move theme and css to launch() — Gradio 6 ignores them on Blocks
Browse files
app.py
CHANGED
|
@@ -214,7 +214,9 @@ CSS = """
|
|
| 214 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 215 |
"""
|
| 216 |
|
| 217 |
-
|
|
|
|
|
|
|
| 218 |
with gr.Column(elem_id="col-container"):
|
| 219 |
gr.Markdown(
|
| 220 |
"""
|
|
@@ -300,4 +302,10 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS, title="Sprite Forge") as demo:
|
|
| 300 |
)
|
| 301 |
|
| 302 |
if __name__ == "__main__":
|
| 303 |
-
demo.queue(default_concurrency_limit=4).launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 215 |
"""
|
| 216 |
|
| 217 |
+
# Gradio 6 moved `theme` and `css` off the Blocks constructor onto `launch()`; passing them here is only a warning,
|
| 218 |
+
# so the theme silently does not apply.
|
| 219 |
+
with gr.Blocks(title="Sprite Forge") as demo:
|
| 220 |
with gr.Column(elem_id="col-container"):
|
| 221 |
gr.Markdown(
|
| 222 |
"""
|
|
|
|
| 302 |
)
|
| 303 |
|
| 304 |
if __name__ == "__main__":
|
| 305 |
+
demo.queue(default_concurrency_limit=4).launch(
|
| 306 |
+
theme=gr.themes.Citrus(),
|
| 307 |
+
css=CSS,
|
| 308 |
+
ssr_mode=False,
|
| 309 |
+
show_error=True,
|
| 310 |
+
allowed_paths=[OUTPUT_DIR],
|
| 311 |
+
)
|