spagestic commited on
Commit
e01e98b
·
1 Parent(s): 1fc9fb8

Chatbot height increased

Browse files
Files changed (2) hide show
  1. assets/app.css +19 -3
  2. ui/chat.py +7 -13
assets/app.css CHANGED
@@ -21,7 +21,21 @@
21
  min-height: 0;
22
  }
23
 
24
- .borderless-tabs,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  .borderless-chat-panel > :where(.gap, .block, .form, div) {
26
  display: flex;
27
  flex-direction: column;
@@ -39,14 +53,16 @@
39
  font-size: 0.9rem;
40
  }
41
 
 
42
  .borderless-chat-panel .chatbot {
43
  flex: 1 1 auto;
44
- min-height: 0;
45
  }
46
 
47
  .borderless-chat-panel .chatbot-wrap,
48
  .borderless-chat-panel .bubble-wrap {
49
- min-height: 0;
 
50
  }
51
 
52
  .borderless-hero h2 {
 
21
  min-height: 0;
22
  }
23
 
24
+ .borderless-tabs {
25
+ display: flex;
26
+ flex-direction: column;
27
+ flex: 1 1 auto;
28
+ min-height: 0;
29
+ height: 100%;
30
+ }
31
+
32
+ .borderless-tabs .tabitem {
33
+ flex: 1 1 auto;
34
+ min-height: 0;
35
+ display: flex;
36
+ flex-direction: column;
37
+ }
38
+
39
  .borderless-chat-panel > :where(.gap, .block, .form, div) {
40
  display: flex;
41
  flex-direction: column;
 
53
  font-size: 0.9rem;
54
  }
55
 
56
+ .borderless-chat-panel .borderless-chatbot,
57
  .borderless-chat-panel .chatbot {
58
  flex: 1 1 auto;
59
+ min-height: 58vh;
60
  }
61
 
62
  .borderless-chat-panel .chatbot-wrap,
63
  .borderless-chat-panel .bubble-wrap {
64
+ flex: 1 1 auto;
65
+ min-height: 58vh;
66
  }
67
 
68
  .borderless-hero h2 {
ui/chat.py CHANGED
@@ -177,19 +177,6 @@ def render_intake_panel(chat_input: gr.MultimodalTextbox) -> None:
177
  queue=False,
178
  )
179
 
180
- gr.Markdown(
181
- "After creating a prompt, open the Chat tab and send it.",
182
- elem_classes=["borderless-form-hint"],
183
- )
184
- gr.Markdown("Try a demo persona:", elem_classes=["borderless-examples-title"])
185
- for label, prompt in EXAMPLE_PROMPTS:
186
- gr.Button(label, size="sm").click(
187
- fn=example_prompt,
188
- inputs=[gr.State(prompt)],
189
- outputs=chat_input,
190
- queue=False,
191
- )
192
-
193
 
194
  class SidebarChatInterface(gr.ChatInterface):
195
  def __init__(
@@ -254,8 +241,15 @@ def create_chat_interface(
254
  chat = SidebarChatInterface(
255
  respond,
256
  multimodal=True,
 
 
 
 
 
 
257
  textbox=chat_input,
258
  history_container=history_container,
 
259
  additional_inputs=[
260
  gr.State(BORDERLESS_SYSTEM_PROMPT),
261
  gr.State(DEFAULT_MAX_TOKENS),
 
177
  queue=False,
178
  )
179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
  class SidebarChatInterface(gr.ChatInterface):
182
  def __init__(
 
241
  chat = SidebarChatInterface(
242
  respond,
243
  multimodal=True,
244
+ chatbot=gr.Chatbot(
245
+ height="72vh",
246
+ show_label=False,
247
+ container=False,
248
+ elem_classes=["borderless-chatbot"],
249
+ ),
250
  textbox=chat_input,
251
  history_container=history_container,
252
+ fill_height=True,
253
  additional_inputs=[
254
  gr.State(BORDERLESS_SYSTEM_PROMPT),
255
  gr.State(DEFAULT_MAX_TOKENS),