Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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(
|
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
|