smjain commited on
Commit
cdb2aab
·
1 Parent(s): 6091881

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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 gr
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:cornflowerblue;color:white}
49
- .msg.bot {background-color:lightgray;align-self:self-end}
50
  .footer {display:none !important}
51
  """
52
-
53
- gr.Interface(fn=converse,
54
  theme="default",
55
- inputs=[gr.inputs.Textbox(placeholder="How are you?"), "state"],
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()