Wootang01 commited on
Commit
895fa99
·
1 Parent(s): f34d4f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -12,5 +12,13 @@ def predict(input, history=[]):
12
  response = tokenizer.decode(history[0]).replace("<|endoftext|>", "\n")
13
  return response, history
14
 
 
 
 
 
 
 
 
 
15
  gr.Interface(fn=predict, theme="grass", css=".footer {display:none !important}", title="Chatbot Two",
16
- inputs=[gr.inputs.Textbox(placeholder="Write a text message as if writing a text message to a human. Submit and the machine will attempt to respond with an appropriate text message."), "state"], outputs=["text", "state"]).launch()
 
12
  response = tokenizer.decode(history[0]).replace("<|endoftext|>", "\n")
13
  return response, history
14
 
15
+ css = """
16
+ .chatbox {display:flex;flex-direction:column}
17
+ .msg {padding:4px;margin-bottom:4px;border-radius:4px;width:80%}
18
+ .msg.user {background-color:cornflowerblue;color:white}
19
+ .msg.bot {background-color:lightgray;align-self:self-end}
20
+ .footer {display:none !important}
21
+ """
22
+
23
  gr.Interface(fn=predict, theme="grass", css=".footer {display:none !important}", title="Chatbot Two",
24
+ inputs=[gr.inputs.Textbox(placeholder="Write a text message as if writing a text message to a human."), "state"], outputs=["text", "state"]).launch()