diff --git a/source/api/Application.py b/source/api/Application.py index 9a4328e..9210073 100644 --- a/source/api/Application.py +++ b/source/api/Application.py @@ -12,5 +12,9 @@ class Application(fastapi.FastAPI): redoc_url=None, ) + async def on_shutdown(self): + print("Shutdown event detected.") + def serve(self, host: str = "0.0.0.0", port: int = 8080): + self.add_event_handler("shutdown", self.on_shutdown) uvicorn.run(self, host=host, port=port) \ No newline at end of file diff --git a/source/api/interface/ChatInterface.py b/source/api/interface/ChatInterface.py index a4542a6..669536f 100644 --- a/source/api/interface/ChatInterface.py +++ b/source/api/interface/ChatInterface.py @@ -53,6 +53,10 @@ class ChatInterface(base.BaseInterface): gradio.Markdown(textwrap.dedent(f""" # {meta.name} ## {self.model.name} + + > {self.model.summary} + + {self.model.description} """)) # additional settings