Update LLMInsights.py
Browse files- LLMInsights.py +2 -1
LLMInsights.py
CHANGED
@@ -397,8 +397,9 @@ with tab1:
|
|
397 |
st.text_area(label="", value=score, height=30)
|
398 |
st.markdown('<h1 style="color:#100170;font-size:24px;">Hallucinated?</h1>', unsafe_allow_html=True)
|
399 |
st.text_area(label="", value=hallucination_score, height=30)
|
|
|
400 |
st.markdown('<h1 style="color:#100170;font-size:24px;">Context</h1>', unsafe_allow_html=True)
|
401 |
-
st.text_area(label="", value=
|
402 |
|
403 |
metadata_list = [doc.metadata for doc in response["source_documents"]]
|
404 |
formatted_metadata_list = []
|
|
|
397 |
st.text_area(label="", value=score, height=30)
|
398 |
st.markdown('<h1 style="color:#100170;font-size:24px;">Hallucinated?</h1>', unsafe_allow_html=True)
|
399 |
st.text_area(label="", value=hallucination_score, height=30)
|
400 |
+
cleaned_context = "\n".join(line.strip() for line in context.splitlines() if line.strip())
|
401 |
st.markdown('<h1 style="color:#100170;font-size:24px;">Context</h1>', unsafe_allow_html=True)
|
402 |
+
st.text_area(label="", value=cleaned_context)
|
403 |
|
404 |
metadata_list = [doc.metadata for doc in response["source_documents"]]
|
405 |
formatted_metadata_list = []
|