Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: made chat area stretch to fill the screen #1397

Merged
merged 2 commits into from
Dec 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions private_gpt/ui/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<div class='logo'/><img src={logo_svg} alt=PrivateGPT></div")

with gr.Row():
with gr.Column(scale=3, variant="compact"):
with gr.Row(equal_height=False):
with gr.Column(scale=3):
mode = gr.Radio(
MODES,
label="Mode",
Expand Down Expand Up @@ -271,12 +275,13 @@ def _build_ui_blocks(self) -> gr.Blocks:
inputs=system_prompt_input,
)

with gr.Column(scale=7):
with gr.Column(scale=7, elem_id='col'):
therohitdas marked this conversation as resolved.
Show resolved Hide resolved
_ = 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,
Expand Down
Loading