From 1fd49b0257c21a2b11c336bc6b478278f77a5b2d Mon Sep 17 00:00:00 2001 From: Rohit Das <43847374+therohitdas@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:46:53 +0530 Subject: [PATCH 1/2] feat: made chat area stretch to fill the screen --- 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..01d4b06af 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, From d9ac4d8c6e4acf9fb8e4789cfae66e4070c31633 Mon Sep 17 00:00:00 2001 From: Rohit Das <43847374+therohitdas@users.noreply.github.com> Date: Sun, 17 Dec 2023 15:31:51 +0530 Subject: [PATCH 2/2] Update private_gpt/ui/ui.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Iván Martínez