feat(ui): make chat area stretch to fill the screen (#1397)
This commit is contained in:
		
							parent
							
								
									2564f8d2bb
								
							
						
					
					
						commit
						c71ae7cee9
					
				|  | @ -219,13 +219,17 @@ class PrivateGptUi: | ||||||
|             "justify-content: center;" |             "justify-content: center;" | ||||||
|             "align-items: 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: |         ) as blocks: | ||||||
|             with gr.Row(): |             with gr.Row(): | ||||||
|                 gr.HTML(f"<div class='logo'/><img src={logo_svg} alt=PrivateGPT></div") |                 gr.HTML(f"<div class='logo'/><img src={logo_svg} alt=PrivateGPT></div") | ||||||
| 
 | 
 | ||||||
|             with gr.Row(): |             with gr.Row(equal_height=False): | ||||||
|                 with gr.Column(scale=3, variant="compact"): |                 with gr.Column(scale=3): | ||||||
|                     mode = gr.Radio( |                     mode = gr.Radio( | ||||||
|                         MODES, |                         MODES, | ||||||
|                         label="Mode", |                         label="Mode", | ||||||
|  | @ -271,12 +275,13 @@ class PrivateGptUi: | ||||||
|                         inputs=system_prompt_input, |                         inputs=system_prompt_input, | ||||||
|                     ) |                     ) | ||||||
| 
 | 
 | ||||||
|                 with gr.Column(scale=7): |                 with gr.Column(scale=7, elem_id="col"): | ||||||
|                     _ = gr.ChatInterface( |                     _ = gr.ChatInterface( | ||||||
|                         self._chat, |                         self._chat, | ||||||
|                         chatbot=gr.Chatbot( |                         chatbot=gr.Chatbot( | ||||||
|                             label=f"LLM: {settings().llm.mode}", |                             label=f"LLM: {settings().llm.mode}", | ||||||
|                             show_copy_button=True, |                             show_copy_button=True, | ||||||
|  |                             elem_id="chatbot", | ||||||
|                             render=False, |                             render=False, | ||||||
|                             avatar_images=( |                             avatar_images=( | ||||||
|                                 None, |                                 None, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue