def run_server(top10k, top100k, nlp, model):
cherrypy.config.update({
"environment": "production",
"log.screen": True
})
cherrypy.server.socket_port = 16384
#cherrypy.server.socket_host = "0.0.0.0"
rest_conf = {"/": {
"request.dispatch": cherrypy.dispatch.MethodDispatcher(),
'cors.expose.on': True
}}
cherrypy_cors.install()
cherrypy.quickstart(SimplifyEndpoint(top10k, top100k, nlp, model), "/simplify", rest_conf)
评论列表
文章目录