Update app.py
Browse files
app.py
CHANGED
@@ -40,18 +40,18 @@ def converse(user_input, chat_history=[]):
|
|
40 |
print(html)
|
41 |
return html, chat_history
|
42 |
|
43 |
-
import gradio as
|
44 |
|
45 |
css = """
|
46 |
.chatbox {display:flex;flex-direction:column}
|
47 |
.msg {padding:4px;margin-bottom:4px;border-radius:4px;width:80%}
|
48 |
-
.msg.user {background-color:
|
49 |
-
.msg.bot {background-color:
|
50 |
.footer {display:none !important}
|
51 |
"""
|
52 |
-
|
53 |
-
|
54 |
theme="default",
|
55 |
-
inputs=[
|
56 |
outputs=["html", "state"],
|
57 |
css=css).launch()
|
|
|
40 |
print(html)
|
41 |
return html, chat_history
|
42 |
|
43 |
+
import gradio as grad
|
44 |
|
45 |
css = """
|
46 |
.chatbox {display:flex;flex-direction:column}
|
47 |
.msg {padding:4px;margin-bottom:4px;border-radius:4px;width:80%}
|
48 |
+
.msg.user {background-color:blue;color:white}
|
49 |
+
.msg.bot {background-color:orange;align-self:self-end}
|
50 |
.footer {display:none !important}
|
51 |
"""
|
52 |
+
text=grad.inputs.Textbox(placeholder="Lets chat")
|
53 |
+
grad.Interface(fn=converse,
|
54 |
theme="default",
|
55 |
+
inputs=[text, "state"],
|
56 |
outputs=["html", "state"],
|
57 |
css=css).launch()
|