Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ if uploaded_file and "document_uploaded" not in st.session_state:
|
|
| 53 |
st.session_state["document_uploaded"] = True
|
| 54 |
|
| 55 |
# Chat UI Header
|
| 56 |
-
st.title("💬
|
| 57 |
st.divider()
|
| 58 |
|
| 59 |
# Display chat history
|
|
@@ -63,7 +63,7 @@ for message in memory_storage.messages:
|
|
| 63 |
|
| 64 |
with st.chat_message(role, avatar=f"data:image/jpeg;base64,{avatar}"):
|
| 65 |
if role == "assistant":
|
| 66 |
-
# Display AI response
|
| 67 |
st.markdown(f"```\n{message.content}\n```")
|
| 68 |
else:
|
| 69 |
st.markdown(message.content)
|
|
@@ -87,6 +87,6 @@ if user_input:
|
|
| 87 |
|
| 88 |
memory_storage.add_ai_message(answer)
|
| 89 |
|
| 90 |
-
# Display AI response
|
| 91 |
with st.chat_message("assistant", avatar=f"data:image/jpeg;base64,{ai_avatar}"):
|
| 92 |
st.markdown(f"```\n{answer.content}\n```")
|
|
|
|
| 53 |
st.session_state["document_uploaded"] = True
|
| 54 |
|
| 55 |
# Chat UI Header
|
| 56 |
+
st.title("💬SOP QA")
|
| 57 |
st.divider()
|
| 58 |
|
| 59 |
# Display chat history
|
|
|
|
| 63 |
|
| 64 |
with st.chat_message(role, avatar=f"data:image/jpeg;base64,{avatar}"):
|
| 65 |
if role == "assistant":
|
| 66 |
+
# Display AI response as a properly formatted Markdown block (copiable)
|
| 67 |
st.markdown(f"```\n{message.content}\n```")
|
| 68 |
else:
|
| 69 |
st.markdown(message.content)
|
|
|
|
| 87 |
|
| 88 |
memory_storage.add_ai_message(answer)
|
| 89 |
|
| 90 |
+
# Display AI response as a Markdown block (copiable)
|
| 91 |
with st.chat_message("assistant", avatar=f"data:image/jpeg;base64,{ai_avatar}"):
|
| 92 |
st.markdown(f"```\n{answer.content}\n```")
|