Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -323,24 +323,23 @@ if query:
|
|
| 323 |
|
| 324 |
# π Expand for Details
|
| 325 |
with st.expander("π **View Detailed Processing (Relevance, Retrieved Contexts, Analysis)**"):
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
st.write(final_output["context_number"])
|
|
|
|
| 323 |
|
| 324 |
# π Expand for Details
|
| 325 |
with st.expander("π **View Detailed Processing (Relevance, Retrieved Contexts, Analysis)**"):
|
| 326 |
+
# π Relevance Analysis
|
| 327 |
+
st.markdown("### π **Relevance Analysis**")
|
| 328 |
+
if isinstance(final_output["relevancy_response"], list):
|
| 329 |
+
for item in final_output["relevancy_response"]:
|
| 330 |
+
st.write(f"β
**Context {item.get('content', 'N/A')} - Score: {item.get('score', 'N/A')}**")
|
| 331 |
+
st.write(f"**Reasoning:** {item.get('Reasoning', 'No explanation provided.')}")
|
| 332 |
+
else:
|
| 333 |
+
st.warning("β οΈ No relevance analysis available.")
|
| 334 |
+
|
| 335 |
+
# π Retrieved Contexts
|
| 336 |
+
st.markdown("### π **Retrieved Contexts**")
|
| 337 |
+
if isinstance(final_output["relevant_contexts"], list):
|
| 338 |
+
for idx, doc in enumerate(final_output["relevant_contexts"], 1):
|
| 339 |
+
st.write(f"πΉ **Context {idx}:** {doc}")
|
| 340 |
+
else:
|
| 341 |
+
st.warning("β οΈ No retrieved context available.")
|
| 342 |
+
|
| 343 |
+
# π Retrieved Context Numbers
|
| 344 |
+
st.markdown("### π **Relevant Context Numbers**")
|
| 345 |
+
st.write(final_output["context_number"])
|
|
|