shandong1970 commited on
Commit
4cf9433
·
verified ·
1 Parent(s): 5cee07c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -16
app.py CHANGED
@@ -32,20 +32,21 @@ def converse(user_input, chat_history=[]):
32
  print(mesg)
33
 
34
  html += "<div class='mesg {}'> {}</div>".format(clazz,mesg)
35
- html += "</div>"
36
- print(html)
37
- return html, chat_history
38
-
39
- import gradio as grad
40
-
41
- css ="""
42
- .mychat {display:flex;flex-direction:column}
43
- .mesg {padding:5px;margin-bottom:5px;border-radius:5px;width:75%}
44
- .mesg.user {background-color:lightblue;color:white}
45
- .mesg.alicia {background-color:orange;color:white,align-self:self-end}
46
- .footer {display:none !important}
47
- """
48
-
49
- text = grad.inputs.Textbox(placeholder="Lets chat")
50
- grad.Interface(fn=converse, theme="default",inputs=[text,"state"],outputs=["html","state"],css=css).launch()
 
51
 
 
32
  print(mesg)
33
 
34
  html += "<div class='mesg {}'> {}</div>".format(clazz,mesg)
35
+
36
+ html += "</div>"
37
+ print(html)
38
+ return html, chat_history
39
+
40
+ import gradio as grad
41
+
42
+ css ="""
43
+ .mychat {display:flex;flex-direction:column}
44
+ .mesg {padding:5px;margin-bottom:5px;border-radius:5px;width:75%}
45
+ .mesg.user {background-color:lightblue;color:white}
46
+ .mesg.alicia {background-color:orange;color:white,align-self:self-end}
47
+ .footer {display:none !important}
48
+ """
49
+
50
+ text = grad.inputs.Textbox(placeholder="Lets chat")
51
+ grad.Interface(fn=converse, theme="default",inputs=[text,"state"],outputs=["html","state"],css=css).launch()
52