class_docstr: The ``ServeStreamlit`` work allows you to use streamlit from a work.
  
  You can optionally build a model in the ``build_model`` hook, which will only be called once per session.
class_docstr_tok: ["The","``","ServeStreamlit","``","work","allows","you","to","use","streamlit","from","a","work",".","You","can","optionally","build","a","model","in","the","``","build_model","``","hook",",","which","will","only","be","called","once","per","session","."]
code: def on_exit(self) -> None:
      if self._process is not None:
          self._process.kill()
  
imports: import abc
  import inspect
  import os
  import pydoc
  import subprocess
  import sys
  from typing import Any, Callable, Type
  from lightning.app.core.work import LightningWork
  from lightning.app.utilities.app_helpers import StreamLitStatePlugin
  from lightning.app.utilities.state import AppState
label_desc: Use image node_id 6 for calling the ServeStreamlit obj's underlying member method code with example usage: obj.on_exit() without return types