Update app.py
Browse files
app.py
CHANGED
@@ -204,7 +204,8 @@ if prompt := st.chat_input("How can I help you today?"):
|
|
204 |
|
205 |
def stream_example():
|
206 |
for word in result['result'].split():
|
207 |
-
|
|
|
208 |
time.sleep(0.1)
|
209 |
|
210 |
# for item in output:
|
@@ -212,8 +213,8 @@ if prompt := st.chat_input("How can I help you today?"):
|
|
212 |
# message_placeholder.markdown(full_response + "▌")
|
213 |
# message_placeholder.markdown(full_response)
|
214 |
#message_placeholder.markdown(result['source_documents'])
|
215 |
-
|
216 |
-
|
217 |
|
218 |
|
219 |
# for item in output:
|
|
|
204 |
|
205 |
def stream_example():
|
206 |
for word in result['result'].split():
|
207 |
+
st.write(word+' ')
|
208 |
+
#yield word + " "
|
209 |
time.sleep(0.1)
|
210 |
|
211 |
# for item in output:
|
|
|
213 |
# message_placeholder.markdown(full_response + "▌")
|
214 |
# message_placeholder.markdown(full_response)
|
215 |
#message_placeholder.markdown(result['source_documents'])
|
216 |
+
|
217 |
+
stream_example()
|
218 |
|
219 |
|
220 |
# for item in output:
|