NEXAS commited on
Commit
f15c271
·
verified ·
1 Parent(s): 3a7e4d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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("💬 SOP QA")
57
  st.divider()
58
 
59
  # Display chat history
@@ -63,7 +63,8 @@ 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
- st.code(message.content, language="markdown") # Copiable markdown
 
67
  else:
68
  st.markdown(message.content)
69
 
@@ -86,6 +87,6 @@ if user_input:
86
 
87
  memory_storage.add_ai_message(answer)
88
 
89
- # Display AI response as a copiable markdown block
90
  with st.chat_message("assistant", avatar=f"data:image/jpeg;base64,{ai_avatar}"):
91
- st.code(answer.content, language="markdown")
 
53
  st.session_state["document_uploaded"] = True
54
 
55
  # Chat UI Header
56
+ st.title("💬 AI Chat Assistant")
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 with Markdown formatting for a ChatGPT-like feel
67
+ st.markdown(f"```\n{message.content}\n```")
68
  else:
69
  st.markdown(message.content)
70
 
 
87
 
88
  memory_storage.add_ai_message(answer)
89
 
90
+ # Display AI response in a ChatGPT-like format
91
  with st.chat_message("assistant", avatar=f"data:image/jpeg;base64,{ai_avatar}"):
92
+ st.markdown(f"```\n{answer.content}\n```")