harp-dev commited on
Commit
2b6820e
·
verified ·
1 Parent(s): f0dec50

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
@@ -457,4 +457,7 @@ if __name__ == "__main__":
457
  process_fn=process_fn,
458
  )
459
 
460
- demo.queue().launch(show_error=True, pwa=True)
 
 
 
 
457
  process_fn=process_fn,
458
  )
459
 
460
+ # Server-side rendering puts a Node proxy in front of every request, and Gradio's launch
461
+ # check of the page through it can time out while the model loads, which crashes the app.
462
+ # HARP calls the API alone, so nothing is lost without it.
463
+ demo.queue().launch(show_error=True, pwa=True, ssr_mode=False)