diff --git a/paddlehub/commands/serving.py b/paddlehub/commands/serving.py index c7c5b868d..c0ec248cf 100644 --- a/paddlehub/commands/serving.py +++ b/paddlehub/commands/serving.py @@ -222,6 +222,7 @@ def preinstall_modules(self): def start_app_with_file(self): port = self.args.config.get("port", 8866) + self.args.port = port if ServingCommand.is_port_occupied("127.0.0.1", port) is True: print("Port %s is occupied, please change it." % port) return False @@ -240,6 +241,7 @@ def start_app_with_file(self): def start_single_app_with_file(self): port = self.args.config.get("port", 8866) + self.args.port = port if ServingCommand.is_port_occupied("127.0.0.1", port) is True: print("Port %s is occupied, please change it." % port) return False