ProfessorLeVesseur commited on
Commit
3ec3939
·
verified ·
1 Parent(s): 1783d85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -160,7 +160,17 @@ if q:
160
  answer = ask_with_memory(vector_store, q, st.session_state.history)
161
 
162
  # Display the response in a text area
163
- st.text_area('Response: ', value=answer, height=400, key="response_text_area")
 
 
 
 
 
 
 
 
 
 
164
 
165
  st.success('Powered by MTSS GPT. AI can make mistakes. Consider checking important information.')
166
 
 
160
  answer = ask_with_memory(vector_store, q, st.session_state.history)
161
 
162
  # Display the response in a text area
163
+ # st.text_area('Response: ', value=answer, height=400, key="response_text_area")
164
+ import time
165
+ import random
166
+
167
+ def stream_data():
168
+ for word in answer.split(" "):
169
+ yield word + " "
170
+ # time.sleep(0.02)
171
+ time.sleep(random.uniform(0.03, 0.08))
172
+
173
+ st.write(stream_data)
174
 
175
  st.success('Powered by MTSS GPT. AI can make mistakes. Consider checking important information.')
176