Spaces:
Build error
Build error
Commit
·
ba65da8
1
Parent(s):
97fdae0
Support custom launch config
Browse files
app.py
CHANGED
|
@@ -74,7 +74,12 @@ class App:
|
|
| 74 |
|
| 75 |
def launch(self) -> None:
|
| 76 |
""" Launch the application, blocking. """
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|