mclvntr commited on
Commit
219db6f
·
1 Parent(s): 67b4982

edit chat ui

Browse files
Files changed (2) hide show
  1. app.py +5 -5
  2. style.css +4 -5
app.py CHANGED
@@ -14,7 +14,7 @@ picked_blueprint_js = None
14
  protocol_scores = {}
15
  protocol_markdown = None
16
  DEFAULT_BLUEPRINT_INDEX = 0
17
- DEFAULT_CONVERSATION_TYPE = "Banking"
18
 
19
  HF_TOKEN = os.environ.get('PRIVATE_TOKEN')
20
 
@@ -34,7 +34,7 @@ r = redis.Redis(
34
 
35
  # Predefined conversation examples
36
  conversations = {
37
- "Banking": [
38
  ("Banker", "Hello, welcome to our bank. How may I assist you today?"),
39
  ("Client", "Good afternoon, I am looking to apply for a personal loan to cover some unexpected expenses."),
40
  ("Banker", "Certainly, can you please provide us with some details about your income, expenses, and the amount you are looking to borrow?"),
@@ -47,7 +47,7 @@ conversations = {
47
  ("Client", "Thank you, I'll be in touch. Goodbye for now."),
48
  ("Banker", "Goodbye, have a great day!")
49
  ],
50
- "Unhappy Customer": [
51
  ("Customer Service", "Thank you for contacting customer service. I understand you're having an issue. Could you please explain what's wrong?"),
52
  ("Customer", "I'm very unhappy with the service I received. My order arrived damaged and the support I received was not helpful."),
53
  ("Customer Service", "I'm really sorry to hear that. Could you provide me with your order number so I can look into this for you?"),
@@ -60,7 +60,7 @@ conversations = {
60
  ("Customer", "No, that's all. Thank you."),
61
  ("Customer Service", "Have a great day!")
62
  ],
63
- "Internal": [
64
  ("Employee 1", "Hey colleague, do you have a minute to discuss the new project?"),
65
  ("Employee 2", "Sure, what's up?"),
66
  ("Employee 1", "I think we need to re-evaluate our timeline. The client has requested some changes that will impact our deadlines."),
@@ -262,7 +262,7 @@ def create_app():
262
  chat_html = "<div class='chat-container'>"
263
  for speaker, message in history:
264
  chat_html += f"<div class='message {speaker.lower().replace(' ', '-')}'>"
265
- chat_html += f"<strong>{speaker}:</strong> {message}"
266
  chat_html += "</div>"
267
  chat_html += "</div>"
268
  return chat_html
 
14
  protocol_scores = {}
15
  protocol_markdown = None
16
  DEFAULT_BLUEPRINT_INDEX = 0
17
+ DEFAULT_CONVERSATION_TYPE = "Banking Advice"
18
 
19
  HF_TOKEN = os.environ.get('PRIVATE_TOKEN')
20
 
 
34
 
35
  # Predefined conversation examples
36
  conversations = {
37
+ "Banking Advice": [
38
  ("Banker", "Hello, welcome to our bank. How may I assist you today?"),
39
  ("Client", "Good afternoon, I am looking to apply for a personal loan to cover some unexpected expenses."),
40
  ("Banker", "Certainly, can you please provide us with some details about your income, expenses, and the amount you are looking to borrow?"),
 
47
  ("Client", "Thank you, I'll be in touch. Goodbye for now."),
48
  ("Banker", "Goodbye, have a great day!")
49
  ],
50
+ "Unsatisfied Customer": [
51
  ("Customer Service", "Thank you for contacting customer service. I understand you're having an issue. Could you please explain what's wrong?"),
52
  ("Customer", "I'm very unhappy with the service I received. My order arrived damaged and the support I received was not helpful."),
53
  ("Customer Service", "I'm really sorry to hear that. Could you provide me with your order number so I can look into this for you?"),
 
60
  ("Customer", "No, that's all. Thank you."),
61
  ("Customer Service", "Have a great day!")
62
  ],
63
+ "Internal Communication": [
64
  ("Employee 1", "Hey colleague, do you have a minute to discuss the new project?"),
65
  ("Employee 2", "Sure, what's up?"),
66
  ("Employee 1", "I think we need to re-evaluate our timeline. The client has requested some changes that will impact our deadlines."),
 
262
  chat_html = "<div class='chat-container'>"
263
  for speaker, message in history:
264
  chat_html += f"<div class='message {speaker.lower().replace(' ', '-')}'>"
265
+ chat_html += f"<semi-bold>{speaker}:</semi-bold> {message}"
266
  chat_html += "</div>"
267
  chat_html += "</div>"
268
  return chat_html
style.css CHANGED
@@ -318,7 +318,7 @@ div.protocol-item {
318
  }
319
 
320
  .banker, .customer-service, .employee-1 {
321
- background-color: #3592FF44;
322
  color: #1565C0 !important;
323
  float: left;
324
  }
@@ -330,13 +330,12 @@ div.protocol-item {
330
  }
331
 
332
  /* Style for the sender's name */
333
- .message strong {
334
- display: block;
335
- margin-bottom: 5px;
336
  font-weight: 600;
337
  }
338
 
339
  footer {
340
  display: none !important;
341
- visibility: hidden !important;
342
  }
 
318
  }
319
 
320
  .banker, .customer-service, .employee-1 {
321
+ background-color: #3592FF44 !important;
322
  color: #1565C0 !important;
323
  float: left;
324
  }
 
330
  }
331
 
332
  /* Style for the sender's name */
333
+ .message semi-bold {
334
+ color: #0010CC !important;
 
335
  font-weight: 600;
336
  }
337
 
338
  footer {
339
  display: none !important;
340
+ visibility: hidden !important;
341
  }