Update app.py
Browse files
app.py
CHANGED
@@ -202,11 +202,16 @@ if prompt := st.chat_input("How can I help you today?"):
|
|
202 |
st.session_state['reference'] = '/home/user/app/pdf2image/default_output.png'
|
203 |
st.session_state['audio'] = ''
|
204 |
|
205 |
-
def stream_example():
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
# for item in output:
|
212 |
# full_response += item
|
@@ -214,7 +219,7 @@ if prompt := st.chat_input("How can I help you today?"):
|
|
214 |
# message_placeholder.markdown(full_response)
|
215 |
#message_placeholder.markdown(result['source_documents'])
|
216 |
|
217 |
-
stream_example()
|
218 |
|
219 |
|
220 |
# for item in output:
|
|
|
202 |
st.session_state['reference'] = '/home/user/app/pdf2image/default_output.png'
|
203 |
st.session_state['audio'] = ''
|
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 word in result['result'].split():
|
212 |
+
message_placeholder.markdown(word+' ')
|
213 |
+
#yield word + " "
|
214 |
+
time.sleep(0.1)
|
215 |
|
216 |
# for item in output:
|
217 |
# full_response += item
|
|
|
219 |
# message_placeholder.markdown(full_response)
|
220 |
#message_placeholder.markdown(result['source_documents'])
|
221 |
|
222 |
+
#stream_example()
|
223 |
|
224 |
|
225 |
# for item in output:
|