YUS200619 commited on
Commit
1ab78f9
·
verified ·
1 Parent(s): f234241

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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=True,
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
  )