NMundhra commited on
Commit
b43fb26
·
1 Parent(s): c0286fc

fix(app): add demo.queue() and standard main guard launcher for Hugging Face Gradio supervisor

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -115,5 +115,7 @@ if HAS_GRADIO:
115
 
116
  btn_run.click(gradio_adapter, inputs=[inp_img, chk_gradcam], outputs=[out_json, out_cam], api_name="predict_multi_head")
117
 
118
- if HAS_GRADIO:
119
- demo.launch(server_name="0.0.0.0", server_port=7860)
 
 
 
115
 
116
  btn_run.click(gradio_adapter, inputs=[inp_img, chk_gradcam], outputs=[out_json, out_cam], api_name="predict_multi_head")
117
 
118
+ demo.queue()
119
+
120
+ if __name__ == "__main__":
121
+ demo.launch()