HelloSun commited on
Commit
899ec6d
·
verified ·
1 Parent(s): 3f6e782

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -16,11 +16,10 @@ 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=8192, truncation=True, num_return_sequences=1)
20
  reply = response[0]['generated_text']
21
 
22
  # 返回新的消息格式
23
- #return [{"role": "user", "content": message}, {"role": "assistant", "content": reply}], history + [{"role": "user", "content": message}, {"role": "assistant", "content": reply}]
24
  print(reply)
25
  return reply
26
 
 
16
  #input_text = message if not history else history[-1]["content"] + " " + message
17
  input_text = message
18
  # 獲取模型的回應
19
+ response = pipe(input_text, max_length=500, truncation=True, num_return_sequences=1)
20
  reply = response[0]['generated_text']
21
 
22
  # 返回新的消息格式
 
23
  print(reply)
24
  return reply
25