IMJONEZZ commited on
Commit
95ab054
·
1 Parent(s): aac926a

space: ssr_mode=False on launch — gradio 6 SSR's Node proxy doesn't forward the raw /pty websocket

Browse files
Files changed (1) hide show
  1. space/app.py +7 -2
space/app.py CHANGED
@@ -317,5 +317,10 @@ app.mount("/static", StaticFiles(directory=STATIC), name="static")
317
 
318
  if __name__ == "__main__":
319
  # gradio's own launch — installs the ZeroGPU hooks + queue and serves our
320
- # custom routes. NOT uvicorn.run, NOT prevent_thread_lock + route surgery.
321
- app.launch(server_name="0.0.0.0", server_port=7860, show_error=True)
 
 
 
 
 
 
317
 
318
  if __name__ == "__main__":
319
  # gradio's own launch — installs the ZeroGPU hooks + queue and serves our
320
+ # custom routes. ssr_mode=False is load-bearing: gradio 6's SSR spins up a
321
+ # Node proxy that does NOT forward our raw /pty websocket (custom GET routes
322
+ # get through, the websocket doesn't). Disabling SSR keeps everything in the
323
+ # one Python server so the PTY bridge works.
324
+ app.launch(
325
+ server_name="0.0.0.0", server_port=7860, show_error=True, ssr_mode=False
326
+ )