Update LLMInsights.py
Browse files- LLMInsights.py +5 -3
LLMInsights.py
CHANGED
|
@@ -330,7 +330,7 @@ with tab1:
|
|
| 330 |
|
| 331 |
question = st.text_input(label="", value="", placeholder="Type in question",label_visibility="visible", disabled=False)
|
| 332 |
#st.markdown('<h2 style="color:#3a0aa6;font-size:24px;">Evaluation</h2>', unsafe_allow_html=True)
|
| 333 |
-
evaluate = st.radio("Perform Evaluation", ["True", "False"])
|
| 334 |
|
| 335 |
m = st.markdown("""
|
| 336 |
<style>
|
|
@@ -401,8 +401,10 @@ with tab1:
|
|
| 401 |
st.text_area(label=" ", value=hallucination_score, height=30)
|
| 402 |
st.markdown('<h1 style="color:#100170;font-size:24px;">context</h1>', unsafe_allow_html=True)
|
| 403 |
st.text_area(label="", value=context)
|
| 404 |
-
|
| 405 |
-
|
|
|
|
|
|
|
| 406 |
|
| 407 |
|
| 408 |
|
|
|
|
| 330 |
|
| 331 |
question = st.text_input(label="", value="", placeholder="Type in question",label_visibility="visible", disabled=False)
|
| 332 |
#st.markdown('<h2 style="color:#3a0aa6;font-size:24px;">Evaluation</h2>', unsafe_allow_html=True)
|
| 333 |
+
evaluate = st.radio("<h1 style='font-weight: bold;'>Perform Evaluation</h1>", ["True", "False"], format_func=lambda label: f"{label}")
|
| 334 |
|
| 335 |
m = st.markdown("""
|
| 336 |
<style>
|
|
|
|
| 401 |
st.text_area(label=" ", value=hallucination_score, height=30)
|
| 402 |
st.markdown('<h1 style="color:#100170;font-size:24px;">context</h1>', unsafe_allow_html=True)
|
| 403 |
st.text_area(label="", value=context)
|
| 404 |
+
descriptions = [doc.metadata.get('description', '') for doc in response["source_documents"]]
|
| 405 |
+
descriptions_text = '\n'.join(descriptions)
|
| 406 |
+
st.markdown('<h1 style="color:#100170;font-size:24px;">Augmented Knowledge Descriptions</h1>', unsafe_allow_html=True)
|
| 407 |
+
st.text_area(label="", value=descriptions_text, height=400)
|
| 408 |
|
| 409 |
|
| 410 |
|