harp-dev commited on
Commit
2c78d2d
·
verified ·
1 Parent(s): 37a71d1

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