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,
|
redoc_url=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async def on_shutdown(self):
|
||||||
|
print("Shutdown event detected.")
|
||||||
|
|
||||||
def serve(self, host: str = "0.0.0.0", port: int = 8080):
|
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)
|
uvicorn.run(self, host=host, port=port)
|
|
@ -53,6 +53,10 @@ class ChatInterface(base.BaseInterface):
|
||||||
gradio.Markdown(textwrap.dedent(f"""
|
gradio.Markdown(textwrap.dedent(f"""
|
||||||
# {meta.name}
|
# {meta.name}
|
||||||
## {self.model.name}
|
## {self.model.name}
|
||||||
|
|
||||||
|
> {self.model.summary}
|
||||||
|
|
||||||
|
{self.model.description}
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
# additional settings
|
# additional settings
|
||||||
|
|
Loading…
Reference in a new issue