Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -191,7 +191,7 @@ def getanswerByXunFei(t):
|
|
191 |
getText("assistant", ans)
|
192 |
return answer
|
193 |
|
194 |
-
|
195 |
st.markdown("我是讯飞聊天机器人,我可以回答您的任何问题")
|
196 |
if 'generated' not in st.session_state:
|
197 |
st.session_state['generated'] = []
|
@@ -199,6 +199,7 @@ if 'past' not in st.session_state:
|
|
199 |
st.session_state['past'] = []
|
200 |
user_input=st.text_input("请输入您的问题:",key='input')
|
201 |
if user_input:
|
|
|
202 |
output=getanswerByXunFei(user_input)
|
203 |
st.session_state['past'].append(user_input)
|
204 |
st.session_state['generated'].append(output)
|
|
|
191 |
getText("assistant", ans)
|
192 |
return answer
|
193 |
|
194 |
+
|
195 |
st.markdown("我是讯飞聊天机器人,我可以回答您的任何问题")
|
196 |
if 'generated' not in st.session_state:
|
197 |
st.session_state['generated'] = []
|
|
|
199 |
st.session_state['past'] = []
|
200 |
user_input=st.text_input("请输入您的问题:",key='input')
|
201 |
if user_input:
|
202 |
+
output.clear
|
203 |
output=getanswerByXunFei(user_input)
|
204 |
st.session_state['past'].append(user_input)
|
205 |
st.session_state['generated'].append(output)
|