Update LLMInsights.py
Browse files- LLMInsights.py +4 -4
LLMInsights.py
CHANGED
@@ -176,16 +176,16 @@ def rag_response(response):
|
|
176 |
|
177 |
st.markdown('<h1 style="color:#100170;font-size:32px;text-align:center;padding:0;">RAG Response</h1>', unsafe_allow_html=True)
|
178 |
|
179 |
-
question_title = '<h2 style="color:#100170;font-size:
|
180 |
question = f"<div style='background-color:#f0f0f0; padding:10px; border-radius:10px;'>{response['query']}</div>"
|
181 |
st.markdown(question_title, unsafe_allow_html=True)
|
182 |
st.markdown(question, unsafe_allow_html=True)
|
183 |
|
184 |
-
rag_output_title = '<h2 style="color:#100170;font-size:
|
185 |
rag_output = f"<div style='background-color:#f0f0f0; padding:10px; border-radius:10px;'>{response['result']}</div>"
|
186 |
st.markdown(rag_output_title, unsafe_allow_html=True)
|
187 |
st.markdown(rag_output, unsafe_allow_html=True)
|
188 |
-
# st.markdown('<h1 style="color:#100170;font-size:
|
189 |
# st.text_area(label="", value=response["source_documents"])
|
190 |
|
191 |
#st.button("Check Hallucination")
|
@@ -416,7 +416,7 @@ with tab1:
|
|
416 |
metadata_list = [doc.metadata for doc in response["source_documents"]]
|
417 |
formatted_metadata_list = []
|
418 |
for i, metadata in enumerate(metadata_list, start=1):
|
419 |
-
formatted_metadata = f"<h2 style='color:#3366ff; font-size:16px;padding:
|
420 |
source = metadata.get('source', '').replace('\n', '')
|
421 |
title = metadata.get('title', '').replace('\n', '')
|
422 |
description = metadata.get('description', '').replace('\n', '')
|
|
|
176 |
|
177 |
st.markdown('<h1 style="color:#100170;font-size:32px;text-align:center;padding:0;">RAG Response</h1>', unsafe_allow_html=True)
|
178 |
|
179 |
+
question_title = '<h2 style="color:#100170;font-size:18px;">Question</h2>'
|
180 |
question = f"<div style='background-color:#f0f0f0; padding:10px; border-radius:10px;'>{response['query']}</div>"
|
181 |
st.markdown(question_title, unsafe_allow_html=True)
|
182 |
st.markdown(question, unsafe_allow_html=True)
|
183 |
|
184 |
+
rag_output_title = '<h2 style="color:#100170;font-size:18px;">RAG Output</h2>'
|
185 |
rag_output = f"<div style='background-color:#f0f0f0; padding:10px; border-radius:10px;'>{response['result']}</div>"
|
186 |
st.markdown(rag_output_title, unsafe_allow_html=True)
|
187 |
st.markdown(rag_output, unsafe_allow_html=True)
|
188 |
+
# st.markdown('<h1 style="color:#100170;font-size:18px;">Augmented knowledge</h1>', unsafe_allow_html=True)
|
189 |
# st.text_area(label="", value=response["source_documents"])
|
190 |
|
191 |
#st.button("Check Hallucination")
|
|
|
416 |
metadata_list = [doc.metadata for doc in response["source_documents"]]
|
417 |
formatted_metadata_list = []
|
418 |
for i, metadata in enumerate(metadata_list, start=1):
|
419 |
+
formatted_metadata = f"<h2 style='color:#3366ff; font-size:16px;padding:5px 0px;'>Metadata {i}:</h2><"
|
420 |
source = metadata.get('source', '').replace('\n', '')
|
421 |
title = metadata.get('title', '').replace('\n', '')
|
422 |
description = metadata.get('description', '').replace('\n', '')
|