allennlp.service.server_sanic

A Sanic server that serves up AllenNLP models as well as our demo.

Usually you would use serve rather than instantiating an app yourself.

allennlp.service.server_sanic.make_app(build_dir: str = None) → sanic.app.Sanic[source]
allennlp.service.server_sanic.run(port: int, workers: int, trained_models: typing.Dict[str, str], static_dir: str = None) → None[source]

Run the server programatically