From c71ae7cee92463bbc5ea9c434eab9f99166e1363 Mon Sep 17 00:00:00 2001 From: Rohit Das <43847374+therohitdas@users.noreply.github.com> Date: Sun, 17 Dec 2023 16:32:13 +0530 Subject: [PATCH] feat(ui): make chat area stretch to fill the screen (#1397) --- private_gpt/ui/ui.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/private_gpt/ui/ui.py b/private_gpt/ui/ui.py index ad6052b1b..c23bd378f 100644 --- a/private_gpt/ui/ui.py +++ b/private_gpt/ui/ui.py @@ -219,13 +219,17 @@ def _build_ui_blocks(self) -> gr.Blocks: "justify-content: center;" "align-items: center;" "}" - ".logo img { height: 25% }", + ".logo img { height: 25% }" + ".contain { display: flex !important; flex-direction: column !important; }" + "#component-0, #component-3, #component-10, #component-8 { height: 100% !important; }" + "#chatbot { flex-grow: 1 !important; overflow: auto !important;}" + "#col { height: calc(100vh - 112px - 16px) !important; }", ) as blocks: with gr.Row(): gr.HTML(f"
gr.Blocks: inputs=system_prompt_input, ) - with gr.Column(scale=7): + with gr.Column(scale=7, elem_id="col"): _ = gr.ChatInterface( self._chat, chatbot=gr.Chatbot( label=f"LLM: {settings().llm.mode}", show_copy_button=True, + elem_id="chatbot", render=False, avatar_images=( None,