chandansocial7 commited on
Commit
f83ce0e
1 Parent(s): 7e413f3

setting port from environment variable

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -486,6 +486,7 @@ def main():
486
  )
487
 
488
  # launch
 
489
  demo.launch(server_port=args.port, server_name=args.host, share=args.share)
490
 
491
 
 
486
  )
487
 
488
  # launch
489
+ args.port = int(os.environ.get('PORT', 7860)) # default port is 7860 if PORT env var is not set
490
  demo.launch(server_port=args.port, server_name=args.host, share=args.share)
491
 
492