Tricia Nieva commited on
Commit
6a65a2d
·
1 Parent(s): e153220

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -37,4 +37,18 @@ def predict(input, history=[]):
37
  history = response[Completion]
38
 
39
  # convert the tokens to text, and then split the responses into lines
40
- response = tokenizer.decode(history[0]).split("
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  history = response[Completion]
38
 
39
  # convert the tokens to text, and then split the responses into lines
40
+ response = tokenizer.decode(history[0]).split
41
+
42
+ css = """
43
+ .chatbox {display:flex;flex-direction:row}
44
+ .msg {padding:4px;margin-bottom:4px;border-radius:4px;width:80%}
45
+ .msg.user {background-color:cornflowerblue;color:white}
46
+ .msg.bot {background-color:lightgray;align-self:self-end}
47
+ .footer {display:none !important}
48
+ """
49
+
50
+ gr.Interface(fn=predict,
51
+ theme="default",
52
+ inputs=[gr.inputs.Textbox(placeholder="I'm AI-DHD - ask me anything!"), "state"],
53
+ outputs=["html", "state"],
54
+ css=css).launch()