Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -122,14 +122,14 @@ def process_user_question(user_question):
|
|
| 122 |
st.session_state.chat_history = response['chat_history']
|
| 123 |
|
| 124 |
# st.empty()
|
| 125 |
-
user_string = [""]
|
| 126 |
|
| 127 |
for i, message in enumerate(st.session_state.chat_history):
|
| 128 |
if i % 2 == 0:
|
| 129 |
st.write(user_template.replace(
|
| 130 |
"{{MSG}}", message.content), unsafe_allow_html=True)
|
| 131 |
|
| 132 |
-
user_string
|
| 133 |
|
| 134 |
else:
|
| 135 |
st.write(bot_template.replace(
|
|
@@ -145,10 +145,10 @@ def process_user_question(user_question):
|
|
| 145 |
vulputate lacinia, nunc nisl aliquam mauris, eget aliquet nisl nisl et nunc.
|
| 146 |
Sed euismod, nisl nec vulputate lacinia, nunc nisl aliquam mauris, eget aliquet.</p>
|
| 147 |
"""
|
| 148 |
-
*
|
| 149 |
)
|
| 150 |
|
| 151 |
-
|
| 152 |
html(user_string, height=100, scrolling=True)
|
| 153 |
|
| 154 |
|
|
|
|
| 122 |
st.session_state.chat_history = response['chat_history']
|
| 123 |
|
| 124 |
# st.empty()
|
| 125 |
+
user_string = ["1", "2" ]
|
| 126 |
|
| 127 |
for i, message in enumerate(st.session_state.chat_history):
|
| 128 |
if i % 2 == 0:
|
| 129 |
st.write(user_template.replace(
|
| 130 |
"{{MSG}}", message.content), unsafe_allow_html=True)
|
| 131 |
|
| 132 |
+
user_string.append( message.content )
|
| 133 |
|
| 134 |
else:
|
| 135 |
st.write(bot_template.replace(
|
|
|
|
| 145 |
vulputate lacinia, nunc nisl aliquam mauris, eget aliquet nisl nisl et nunc.
|
| 146 |
Sed euismod, nisl nec vulputate lacinia, nunc nisl aliquam mauris, eget aliquet.</p>
|
| 147 |
"""
|
| 148 |
+
* 3
|
| 149 |
)
|
| 150 |
|
| 151 |
+
html(lorem, height=100, scrolling=True)
|
| 152 |
html(user_string, height=100, scrolling=True)
|
| 153 |
|
| 154 |
|