diff --git a/style.css b/style.css new file mode 100644 index 0000000..3c28cd0 --- /dev/null +++ b/style.css @@ -0,0 +1,7 @@ +#chatbot-container { + min-height: calc(100vh - 200px); +} + +#title-container { + max-height: 50px; +} diff --git a/webui.py b/webui.py index d44816f..4cea9e3 100644 --- a/webui.py +++ b/webui.py @@ -61,14 +61,15 @@ def _llm_type(self) -> str: model, tokenizer = initialize_model_and_tokenizer(default_repo_id) -with gr.Blocks(fill_height=True) as demo: +with gr.Blocks(css='style.css') as demo: with gr.Row(): with gr.Column(scale=1): title = gr.Button( value="LLMinator", scale=1, variant="primary", - interactive=True) + interactive=True, + elem_id="title-container") with gr.Group(): repo_id = gr.Textbox( value=default_repo_id, @@ -102,7 +103,7 @@ def _llm_type(self) -> str: with gr.Column(scale=4): with gr.Group(): - chatbot = gr.Chatbot(scale=4) + chatbot = gr.Chatbot(elem_id="chatbot-container") msg = gr.Textbox(label="Prompt") stop = gr.Button("Stop") llm_chain, llm = init_chain(model, tokenizer)