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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -30,13 +30,22 @@ 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 "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)
42
  return html, chat_history
 
30
  # write some HTML
31
  html = "<div class='mybot'>"
32
  for x, mesg in enumerate(response):
33
+ if(x%2==0)
34
+ {
35
+ mesg="Alicia:"+mesg
36
+ clazz="alicia"
37
+ }
38
+ else
39
+ {
40
+ clazz="user"
41
+ }
42
+
43
  print("value of x")
44
  print(x)
45
  print("message")
46
  print (mesg)
47
  mesg="Alicia:"+mesg
48
+ html += "<div class='mesg {}'> {}</div>".format(clazz, mesg)
49
  html += "</div>"
50
  print(html)
51
  return html, chat_history