Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -166,9 +166,10 @@ with gr.Blocks(title="Work-Life Firewall") as demo:
|
|
| 166 |
|
| 167 |
|
| 168 |
if __name__ == "__main__":
|
|
|
|
| 169 |
demo.launch(
|
| 170 |
server_name="0.0.0.0",
|
| 171 |
server_port=int(os.getenv("PORT", "7860")),
|
| 172 |
-
share=
|
| 173 |
show_error=True,
|
| 174 |
)
|
|
|
|
| 166 |
|
| 167 |
|
| 168 |
if __name__ == "__main__":
|
| 169 |
+
on_hugging_face_space = bool(os.getenv("SPACE_ID"))
|
| 170 |
demo.launch(
|
| 171 |
server_name="0.0.0.0",
|
| 172 |
server_port=int(os.getenv("PORT", "7860")),
|
| 173 |
+
share=not on_hugging_face_space,
|
| 174 |
show_error=True,
|
| 175 |
)
|