ClueAI commited on
Commit
294e4dc
1 Parent(s): 773df0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -69,12 +69,15 @@ def chatyuan_bot_regenerate(input, history):
69
  history = history[-5:]
70
 
71
  context = "\n".join([f"用户:{input_text}\n小元:{answer_text}" for input_text, answer_text in history])
72
- print(context)
73
 
74
  input_text = context + "\n用户:" + input + "\n小元:"
 
75
  output_text = answer(input_text)
 
 
76
  history.append((input, output_text))
77
- print(history)
78
  return history, history
79
 
80
  block = gr.Blocks()
 
69
  history = history[-5:]
70
 
71
  context = "\n".join([f"用户:{input_text}\n小元:{answer_text}" for input_text, answer_text in history])
72
+ #print(context)
73
 
74
  input_text = context + "\n用户:" + input + "\n小元:"
75
+ input_text = input_text.strip()
76
  output_text = answer(input_text)
77
+ print("open_model".center(20, "="))
78
+ print(f"{input_text}\n{output_text}")
79
  history.append((input, output_text))
80
+ #print(history)
81
  return history, history
82
 
83
  block = gr.Blocks()