mirror of
https://git.isriupjv.fr/ISRI/ai-server
synced 2025-04-24 01:58:12 +02:00
improved ChatInterface display
This commit is contained in:
parent
e833342581
commit
decac3f150
2 changed files with 8 additions and 0 deletions
|
@ -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)
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue