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

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?



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 polm23