smjain commited on
Commit
5f468a8
·
1 Parent(s): dd85d27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -30,11 +30,12 @@ def converse(user_input, chat_history=[]):
30
  # write some HTML
31
  html = "<div class='mybot'>"
32
  for x, mesg in enumerate(response):
33
- cls = "user" if x%2 == 0 else "bot"
34
  print("value of x")
35
  print(x)
36
  print("message")
37
  print (mesg)
 
38
  html += "<div class='mesg {}'> {}</div>".format(cls, mesg)
39
  html += "</div>"
40
  print(html)
@@ -43,10 +44,10 @@ def converse(user_input, chat_history=[]):
43
  import gradio as grad
44
 
45
  css = """
46
- .chatbox {display:flex;flex-direction:column}
47
  .mesg {padding:5px;margin-bottom:5px;border-radius:5px;width:75%}
48
  .mesg.user {background-color:lightblue;color:white}
49
- .mesg.bot {background-color:orange;color:white,align-self:self-end}
50
  .footer {display:none !important}
51
  """
52
  text=grad.inputs.Textbox(placeholder="Lets chat")
 
30
  # write some HTML
31
  html = "<div class='mybot'>"
32
  for x, mesg in enumerate(response):
33
+ cls = "user" if x%2 == 0 else "alicia"
34
  print("value of x")
35
  print(x)
36
  print("message")
37
  print (mesg)
38
+ mesg="Alicia:"+mesg
39
  html += "<div class='mesg {}'> {}</div>".format(cls, mesg)
40
  html += "</div>"
41
  print(html)
 
44
  import gradio as grad
45
 
46
  css = """
47
+ .mychat {display:flex;flex-direction:column}
48
  .mesg {padding:5px;margin-bottom:5px;border-radius:5px;width:75%}
49
  .mesg.user {background-color:lightblue;color:white}
50
+ .mesg.alicia {background-color:orange;color:white,align-self:self-end}
51
  .footer {display:none !important}
52
  """
53
  text=grad.inputs.Textbox(placeholder="Lets chat")