Fix Streamlit compatibility issue with container border parameter
Browse files
app.py
CHANGED
|
@@ -164,10 +164,12 @@ if st.session_state.messages and len(st.session_state.messages) > 0:
|
|
| 164 |
|
| 165 |
# Show conversation preview
|
| 166 |
st.markdown("**Conversation Preview for HF Expert:**")
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
|
|
|
|
|
|
| 171 |
|
| 172 |
with col2:
|
| 173 |
if st.button("🧠 Activate HF Expert",
|
|
|
|
| 164 |
|
| 165 |
# Show conversation preview
|
| 166 |
st.markdown("**Conversation Preview for HF Expert:**")
|
| 167 |
+
# Create a container-like appearance without using the border parameter
|
| 168 |
+
st.markdown("---")
|
| 169 |
+
for i, msg in enumerate(st.session_state.messages[-5:]): # Last 5 messages
|
| 170 |
+
role = "👤 You" if msg["role"] == "user" else "🤖 Assistant"
|
| 171 |
+
st.markdown(f"**{role}:** {msg['content'][:100]}{'...' if len(msg['content']) > 100 else ''}")
|
| 172 |
+
st.markdown("---")
|
| 173 |
|
| 174 |
with col2:
|
| 175 |
if st.button("🧠 Activate HF Expert",
|