Revert theme/css to launch() (Gradio 6 location); keep ssr_mode=False
Browse files
app.py
CHANGED
|
@@ -280,7 +280,7 @@ button.eink-scan:hover { background:var(--copper) !important; border-color:var(-
|
|
| 280 |
#notice * { font-size:.74rem !important; color:var(--ink2) !important; }
|
| 281 |
"""
|
| 282 |
|
| 283 |
-
with gr.Blocks(title="Forager's Field Station"
|
| 284 |
gr.HTML(
|
| 285 |
"<div id='masthead'>"
|
| 286 |
" <div class='brand'>HOMESTEADER LABS</div>"
|
|
@@ -312,7 +312,7 @@ with gr.Blocks(title="Forager's Field Station", theme=gr.themes.Monochrome(), cs
|
|
| 312 |
img.change(identify, inputs=img, outputs=out)
|
| 313 |
|
| 314 |
if __name__ == "__main__":
|
| 315 |
-
#
|
| 316 |
-
#
|
| 317 |
-
#
|
| 318 |
-
demo.launch(ssr_mode=False)
|
|
|
|
| 280 |
#notice * { font-size:.74rem !important; color:var(--ink2) !important; }
|
| 281 |
"""
|
| 282 |
|
| 283 |
+
with gr.Blocks(title="Forager's Field Station") as demo:
|
| 284 |
gr.HTML(
|
| 285 |
"<div id='masthead'>"
|
| 286 |
" <div class='brand'>HOMESTEADER LABS</div>"
|
|
|
|
| 312 |
img.change(identify, inputs=img, outputs=out)
|
| 313 |
|
| 314 |
if __name__ == "__main__":
|
| 315 |
+
# theme/css belong in launch() in Gradio 6. ssr_mode=False is also enforced via
|
| 316 |
+
# the GRADIO_SSR_MODE Space variable — Gradio 6's Node SSR proxy can't bind port
|
| 317 |
+
# 7860 on this Space, which otherwise strands the app on :7861 (unreachable).
|
| 318 |
+
demo.launch(theme=gr.themes.Monochrome(), css=CSS, ssr_mode=False)
|