Is there any way to put timer/end the serving of infographics automatically in dispacy?

72 Views Asked by At

While running the code with displacy, I see the images being created perfectly as expected. They are also projected to a server, the address of which is mentioned every time someone runs the code. But the problem I am facing is that the code doesn't stop & maybe keeps on running to maintain the server. Is there a way to put a timer to that?

1

There are 1 best solutions below

0
On

No, there is no timer option. If you don't want the server you can just not call displacy.serve, and instead call displacy.render, which just returns the HTML.

See the displacy API docs for full details.