服务器端部署代码
hub serving start -m pyramidbox_lite_server_mask -p 8866
返回信息
Warning: Windows cannot use multiprocess working mode, PaddleHub Serving will switch to single process mode
pyramidbox_lite_server_mask == 1.3.0
* Serving Flask app "paddlehub.serving.app_single" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
客户端调用代码
file_list = ["kouzhao.png"]
files = [("image", (open(item, "rb"))) for item in file_list]
url = "http://127.0.0.1:8866/predict/image/pyramidbox_lite_server_mask"
r = requests.post(url=url, files=files, data={"visual_result": "True"})
报错
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionAbortedError(10053, '你的主机中的软件中
止了一个已建立的连接。', None, 10053, None))
有大佬知道最后这个报错是什么原因吗,客户端一直无法连接上服务器
这个是在AIStudio里面使用的时候报错吗?
不是哦 pc cmd上,解决了 换个端口号多连接几次就好了
请问贴主,你换的端口号是多少?我换了好几个都是错的,web服务端还在加载不了东西,出现108的错误。
这个可以在paddlehub板块了解更多的详情。
这应该得换成自己电脑的ip把