vishwask commited on
Commit
5c020de
1 Parent(s): 7908868

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- yield word + " "
 
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
- message_placeholder.markdown(stream_example())
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: