From f1f5e5ffa0414124c9a33582094eebeb633e749c Mon Sep 17 00:00:00 2001 From: Ben-A-Sabu Date: Tue, 28 May 2024 12:05:36 +0530 Subject: [PATCH] change --- private_gpt/ui/ui.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/private_gpt/ui/ui.py b/private_gpt/ui/ui.py index 6f4450d..06f9d99 100644 --- a/private_gpt/ui/ui.py +++ b/private_gpt/ui/ui.py @@ -300,6 +300,7 @@ class PrivateGptUi: gr.components.Button(interactive=True), gr.components.Textbox(self._selected_filename), ] + def _build_ui_blocks(self) -> gr.Blocks: logger.debug("Creating the UI blocks") with gr.Blocks( @@ -311,6 +312,12 @@ class PrivateGptUi: with gr.Row(equal_height=False): with gr.Column(scale=3): + + HHeader = gr.components.Button( + "Doc Chat", + size="m", + ) + mode = gr.Radio( MODES, label="Mode", @@ -444,18 +451,18 @@ class PrivateGptUi: with gr.Column(scale=7, elem_id="col"): # Determine the model label based on the value of PGPT_PROFILES - model_label = get_model_label() - if model_label is not None: - label_text = ( - f"LLM: {settings().llm.mode} | Model: {model_label}" - ) - else: - label_text = f"LLM: {settings().llm.mode}" + # model_label = get_model_label() + # if model_label is not None: + # label_text = ( + # f"LLM: {settings().llm.mode} | Model: {model_label}" + # ) + # else: + # label_text = f"LLM: {settings().llm.mode}" _ = gr.ChatInterface( self._chat, chatbot=gr.Chatbot( - label=label_text, + # label=label_text, show_copy_button=True, elem_id="chatbot", render=False, @@ -479,7 +486,6 @@ class PrivateGptUi: logger.info("Mounting the gradio UI, at path=%s", path) gr.mount_gradio_app(app, blocks, path=path) - if __name__ == "__main__": ui = global_injector.get(PrivateGptUi) _blocks = ui.get_ui_blocks()