improved ChatInterface display

This commit is contained in:
faraphel 2025-01-23 08:42:30 +01:00
parent e833342581
commit decac3f150
2 changed files with 8 additions and 0 deletions

View file

@ -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)

View file

@ -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