timeki commited on
Commit
c9c0ef3
·
1 Parent(s): bc8c02c

update css for follow up examples

Browse files
climateqa/engine/chains/follow_up.py CHANGED
@@ -15,6 +15,7 @@ def make_follow_up_node(llm):
15
  prompt = ChatPromptTemplate.from_template(FOLLOW_UP_TEMPLATE)
16
 
17
  def generate_follow_up(state):
 
18
  if not state.get("answer"):
19
  return state
20
 
 
15
  prompt = ChatPromptTemplate.from_template(FOLLOW_UP_TEMPLATE)
16
 
17
  def generate_follow_up(state):
18
+ print("---- Generate_follow_up ----")
19
  if not state.get("answer"):
20
  return state
21
 
front/tabs/chat_interface.py CHANGED
@@ -54,9 +54,9 @@ def create_chat_interface(tab):
54
  max_height="80vh",
55
  height="100vh"
56
  )
57
- with gr.Row(elem_id="follow-up-examples"):
58
  follow_up_examples_hidden = gr.Textbox(visible=False, elem_id="follow-up-hidden")
59
- follow_up_examples = gr.Examples(examples=[ ], label="Follow up questions", inputs= [follow_up_examples_hidden], elem_id="follow-up-button", run_on_click=False)
60
 
61
  with gr.Row(elem_id="input-message"):
62
 
 
54
  max_height="80vh",
55
  height="100vh"
56
  )
57
+ with gr.Accordion("Click here for follow up questions examples", elem_id="follow-up-examples",open = False):
58
  follow_up_examples_hidden = gr.Textbox(visible=False, elem_id="follow-up-hidden")
59
+ follow_up_examples = gr.Examples(examples=[], label="", inputs= [follow_up_examples_hidden], elem_id="follow-up-button", run_on_click=False)
60
 
61
  with gr.Row(elem_id="input-message"):
62
 
style.css CHANGED
@@ -29,8 +29,6 @@ main.flex.flex-1.flex-col {
29
  }
30
 
31
 
32
- }
33
-
34
  .tab-nav {
35
  border: none !important;
36
  }
@@ -111,15 +109,18 @@ main.flex.flex-1.flex-col {
111
  border: none;
112
  }
113
 
114
- #input-textbox > label > textarea {
115
  border-radius: 40px;
116
  padding-left: 30px;
117
  resize: none;
118
- background-color: #f0f8ff; /* Light blue background */
119
  border: 2px solid #4b8ec3; /* Blue border */
120
  font-size: 16px; /* Increase font size */
121
  color: #333; /* Text color */
122
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow */
 
 
 
123
  }
124
 
125
  #input-message > div {
@@ -481,14 +482,29 @@ a {
481
 
482
  /* Follow-up Examples Styles */
483
  #follow-up-examples {
484
- height: 15vh;
485
  overflow-y: auto;
486
- padding: 10px 0;
 
 
 
 
487
  }
488
 
489
  #follow-up-button {
490
- height: 100%;
491
- overflow-y: auto;
 
 
 
 
 
 
 
 
 
 
 
492
  }
493
 
494
  /* Media Queries */
@@ -518,8 +534,8 @@ a {
518
  }
519
 
520
  div#chatbot {
521
- height: 65vh !important;
522
- max-height: 65vh !important;
523
  }
524
 
525
  div#chatbot-row {
@@ -544,7 +560,7 @@ a {
544
  }
545
 
546
  #follow-up-examples {
547
- height: 100px;
548
  }
549
 
550
  #submit-button {
 
29
  }
30
 
31
 
 
 
32
  .tab-nav {
33
  border: none !important;
34
  }
 
109
  border: none;
110
  }
111
 
112
+ #input-textbox > label > div > textarea {
113
  border-radius: 40px;
114
  padding-left: 30px;
115
  resize: none;
116
+ background-color: #d7e2ed; /* Light blue background */
117
  border: 2px solid #4b8ec3; /* Blue border */
118
  font-size: 16px; /* Increase font size */
119
  color: #333; /* Text color */
120
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow */
121
+ ::placeholder {
122
+ color: #4b4747; /* Darker placeholder color */
123
+ }
124
  }
125
 
126
  #input-message > div {
 
482
 
483
  /* Follow-up Examples Styles */
484
  #follow-up-examples {
485
+ max-height: 20vh;
486
  overflow-y: auto;
487
+ gap: 8px;
488
+ display: flex;
489
+ flex-direction: column;
490
+ overflow-y: hidden;
491
+ background: rgb(229, 235, 237);
492
  }
493
 
494
  #follow-up-button {
495
+ overflow-y: visible;
496
+ display: block;
497
+ padding: 8px 12px;
498
+ margin: 4px 0;
499
+ border-radius: 8px;
500
+ background-color: #f0f8ff;
501
+ transition: background-color 0.2s;
502
+ background: rgb(240, 240, 236);
503
+
504
+ }
505
+
506
+ #follow-up-button:hover {
507
+ background-color: #e0f0ff;
508
  }
509
 
510
  /* Media Queries */
 
534
  }
535
 
536
  div#chatbot {
537
+ height: 70vh !important;
538
+ max-height: 70vh !important;
539
  }
540
 
541
  div#chatbot-row {
 
560
  }
561
 
562
  #follow-up-examples {
563
+ max-height: 150px;
564
  }
565
 
566
  #submit-button {