DmitriiKhizbullin commited on
Commit
ba65da8
·
1 Parent(s): 97fdae0

Support custom launch config

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -74,7 +74,12 @@ class App:
74
 
75
  def launch(self) -> None:
76
  """ Launch the application, blocking. """
77
- self.ui.queue().launch(share=True)
 
 
 
 
 
78
 
79
  def predict(self, image: Optional[np.ndarray]) -> Dict[str, float]:
80
  """ Gradio callback for pricessing of an image.
 
74
 
75
  def launch(self) -> None:
76
  """ Launch the application, blocking. """
77
+ if 'LABEEB' in os.environ:
78
+ kwargs = dict(share=False, debug=True,
79
+ server_port=8050, server_name="0.0.0.0")
80
+ else:
81
+ kwargs = dict(share=True)
82
+ self.ui.queue().launch(**kwargs)
83
 
84
  def predict(self, image: Optional[np.ndarray]) -> Dict[str, float]:
85
  """ Gradio callback for pricessing of an image.