Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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()
|