Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
|
|
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()
|