Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,11 +30,11 @@ def chat(
|
|
| 30 |
prompt=user_input,
|
| 31 |
max_gen_len=max_gen_len,
|
| 32 |
temperature=temperature,
|
| 33 |
-
top_p=top_p)
|
| 34 |
|
| 35 |
# remove the first phrase identical to user prompt
|
| 36 |
if not include_input:
|
| 37 |
-
bot_response = bot_response[
|
| 38 |
bot_response = bot_response.replace("\n", "<br>")
|
| 39 |
|
| 40 |
# trip the last phrase
|
|
|
|
| 30 |
prompt=user_input,
|
| 31 |
max_gen_len=max_gen_len,
|
| 32 |
temperature=temperature,
|
| 33 |
+
top_p=top_p)[0]
|
| 34 |
|
| 35 |
# remove the first phrase identical to user prompt
|
| 36 |
if not include_input:
|
| 37 |
+
bot_response = bot_response[len(user_input):]
|
| 38 |
bot_response = bot_response.replace("\n", "<br>")
|
| 39 |
|
| 40 |
# trip the last phrase
|