Update LLMInsights.py
Browse files- LLMInsights.py +12 -6
LLMInsights.py
CHANGED
|
@@ -395,12 +395,18 @@ with tab1:
|
|
| 395 |
)
|
| 396 |
else:
|
| 397 |
score = "Evaluation is Turned OFF"
|
| 398 |
-
|
| 399 |
-
st.
|
| 400 |
-
st.
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
metadata_list = [doc.metadata for doc in response["source_documents"]]
|
| 405 |
formatted_metadata_list = []
|
| 406 |
for i, metadata in enumerate(metadata_list, start=1):
|
|
|
|
| 395 |
)
|
| 396 |
else:
|
| 397 |
score = "Evaluation is Turned OFF"
|
| 398 |
+
# Confidence Score
|
| 399 |
+
st.markdown('<h2 style="color:#100170;">Confidence Score</h2>', unsafe_allow_html=True)
|
| 400 |
+
st.text_area(label="", value=score, height=30, format="%.2f", key='confidence_score', disabled=True, style={'font-size': '16px', 'color': '#009900', 'background-color': '#f0f0f0', 'border': 'none', 'resize': 'none'})
|
| 401 |
+
|
| 402 |
+
# Hallucinated
|
| 403 |
+
st.markdown('<h2 style="color:#100170;">Hallucinated?</h2>', unsafe_allow_html=True)
|
| 404 |
+
st.text_area(label="", value=hallucination_score, height=30, format="%.2f", key='hallucination_score', disabled=True, style={'font-size': '16px', 'color': '#009900', 'background-color': '#f0f0f0', 'border': 'none', 'resize': 'none'})
|
| 405 |
+
|
| 406 |
+
# Context
|
| 407 |
+
st.markdown('<h2 style="color:#100170;">Context</h2>', unsafe_allow_html=True)
|
| 408 |
+
st.text_area(label="", value=context, height=100, disabled=True, style={'font-size': '16px', 'color': '#009900', 'background-color': '#f0f0f0', 'border': 'none', 'resize': 'none'})
|
| 409 |
+
|
| 410 |
metadata_list = [doc.metadata for doc in response["source_documents"]]
|
| 411 |
formatted_metadata_list = []
|
| 412 |
for i, metadata in enumerate(metadata_list, start=1):
|