Update src/streamlit_app.py
Browse files- src/streamlit_app.py +5 -2
src/streamlit_app.py
CHANGED
|
@@ -232,8 +232,11 @@ else:
|
|
| 232 |
retrieved = retrieve_chunks(user_query, index, chunks, top_k=top_k, embeddings=embeddings)
|
| 233 |
answer = generate_answer(user_query, retrieved, reasoning_mode=reasoning_mode)
|
| 234 |
st.markdown("### 🤖 Assistant’s Answer")
|
| 235 |
-
|
| 236 |
-
|
|
|
|
|
|
|
|
|
|
| 237 |
|
| 238 |
with st.expander("📘 Supporting Context"):
|
| 239 |
for i, r in enumerate(retrieved, start=1):
|
|
|
|
| 232 |
retrieved = retrieve_chunks(user_query, index, chunks, top_k=top_k, embeddings=embeddings)
|
| 233 |
answer = generate_answer(user_query, retrieved, reasoning_mode=reasoning_mode)
|
| 234 |
st.markdown("### 🤖 Assistant’s Answer")
|
| 235 |
+
|
| 236 |
+
# ✅ Apply bullet formatting only for strict factual mode (not reasoning)
|
| 237 |
+
if not reasoning_mode and not answer.startswith("⚠️"):
|
| 238 |
+
answer = answer.replace("\n-", "<br>•")
|
| 239 |
+
st.markdown(f"<div class='answer-box'>{answer}</div>", unsafe_allow_html=True)
|
| 240 |
|
| 241 |
with st.expander("📘 Supporting Context"):
|
| 242 |
for i, r in enumerate(retrieved, start=1):
|