Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def respond(message, history):
|
|
| 16 |
#input_text = message if not history else history[-1]["content"] + " " + message
|
| 17 |
input_text = message
|
| 18 |
# 獲取模型的回應
|
| 19 |
-
response = pipe(input_text, max_length=
|
| 20 |
reply = response[0]['generated_text']
|
| 21 |
|
| 22 |
# 返回新的消息格式
|
|
|
|
| 16 |
#input_text = message if not history else history[-1]["content"] + " " + message
|
| 17 |
input_text = message
|
| 18 |
# 獲取模型的回應
|
| 19 |
+
response = pipe(input_text, max_length=8192, truncation=True, num_return_sequences=1)
|
| 20 |
reply = response[0]['generated_text']
|
| 21 |
|
| 22 |
# 返回新的消息格式
|