briankchan commited on
Commit
fc039dd
·
1 Parent(s): ed9313b

Fix port error

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -358,4 +358,7 @@ with demo:
358
 
359
  demo.load(load_chain, [api_key, api_type], [chain, llm, chain_intro, chain_body1])
360
 
361
- demo.launch(debug=True, server_port=int(os.environ.get("SERVER_PORT", None)))
 
 
 
 
358
 
359
  demo.load(load_chain, [api_key, api_type], [chain, llm, chain_intro, chain_body1])
360
 
361
+ port = os.environ.get("SERVER_PORT", None)
362
+ if port:
363
+ port = int(port)
364
+ demo.launch(debug=True, server_port=port)