zhoupc commited on
Commit
7a2014b
1 Parent(s): 95051e5

fastapi服务启动限制ip从127.0.0.1改为0.0.0.0,这样docker映射端口才可以使用

Browse files
Files changed (1) hide show
  1. runtime/python/fastapi/server.py +1 -1
runtime/python/fastapi/server.py CHANGED
@@ -80,4 +80,4 @@ if __name__ == '__main__':
80
  help='local path or modelscope repo id')
81
  args = parser.parse_args()
82
  cosyvoice = CosyVoice(args.model_dir)
83
- uvicorn.run(app, host="127.0.0.1", port=args.port)
 
80
  help='local path or modelscope repo id')
81
  args = parser.parse_args()
82
  cosyvoice = CosyVoice(args.model_dir)
83
+ uvicorn.run(app, host="0.0.0.0", port=args.port)