Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
|