Update app.py
Browse files
app.py
CHANGED
@@ -24,11 +24,11 @@ def chat(
|
|
24 |
prompt=user_input,
|
25 |
max_gen_len=max_gen_len,
|
26 |
temperature=temperature,
|
27 |
-
top_p=top_p)
|
28 |
|
29 |
# remove the first phrase identical to user prompt
|
30 |
if not include_input:
|
31 |
-
bot_response = bot_response[
|
32 |
bot_response = bot_response.replace("\n", "<br>")
|
33 |
|
34 |
# trip the last phrase
|
|
|
24 |
prompt=user_input,
|
25 |
max_gen_len=max_gen_len,
|
26 |
temperature=temperature,
|
27 |
+
top_p=top_p)[0]
|
28 |
|
29 |
# remove the first phrase identical to user prompt
|
30 |
if not include_input:
|
31 |
+
bot_response = bot_response[len(user_input):]
|
32 |
bot_response = bot_response.replace("\n", "<br>")
|
33 |
|
34 |
# trip the last phrase
|