harp-dev commited on
Commit
54e66b4
·
verified ·
1 Parent(s): 01c7503

Launch without server-side rendering

Browse files

Gradio's launch check of the page through the Node proxy can time out while the model loads, which crashes the app at startup.

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -227,4 +227,7 @@ if __name__ == "__main__":
227
  process_fn=process_fn,
228
  )
229
 
230
- demo.queue().launch(show_error=True, pwa=True)
 
 
 
 
227
  process_fn=process_fn,
228
  )
229
 
230
+ # Server-side rendering puts a Node proxy in front of every request, and Gradio's launch
231
+ # check of the page through it can time out while the model loads, which crashes the app.
232
+ # HARP calls the API alone, so nothing is lost without it.
233
+ demo.queue().launch(show_error=True, pwa=True, ssr_mode=False)