Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def conversation(user_input, chat_history=[]):
|
|
18 |
chat_history = model.generate(chatbot_input_ids, max_length=1000, pad_token_id=chat_tokenizer.eos_token_id).tolist()
|
19 |
print(chat_history)
|
20 |
|
21 |
-
response =
|
22 |
print("Starting to print response")
|
23 |
print(response)
|
24 |
|
@@ -42,7 +42,7 @@ def conversation(user_input, chat_history=[]):
|
|
42 |
|
43 |
# UX
|
44 |
css = """
|
45 |
-
.
|
46 |
.msg {padding:5px;margin-bottom:5px;border-radius:5px;width:75%}
|
47 |
.msg.user {background-color:lightblue;color:white}
|
48 |
.msg.bot {background-color:orange;color:white,align-self:self-end}
|
|
|
18 |
chat_history = model.generate(chatbot_input_ids, max_length=1000, pad_token_id=chat_tokenizer.eos_token_id).tolist()
|
19 |
print(chat_history)
|
20 |
|
21 |
+
response = chat_tokenizer.decode(chat_history[0]).split("<|endoftext|>")
|
22 |
print("Starting to print response")
|
23 |
print(response)
|
24 |
|
|
|
42 |
|
43 |
# UX
|
44 |
css = """
|
45 |
+
.mychatbot {display:flex;flex-direction:column}
|
46 |
.msg {padding:5px;margin-bottom:5px;border-radius:5px;width:75%}
|
47 |
.msg.user {background-color:lightblue;color:white}
|
48 |
.msg.bot {background-color:orange;color:white,align-self:self-end}
|