DeepVen commited on
Commit
fefff15
·
1 Parent(s): 211523e

Update LLMInsights.py

Browse files
Files changed (1) hide show
  1. LLMInsights.py +4 -4
LLMInsights.py CHANGED
@@ -397,21 +397,21 @@ with tab1:
397
  else:
398
  score = "Evaluation is Turned OFF"
399
  # Confidence Score Section
400
- st.markdown('<h2 style="color:#100170;font-size:24px">Confidence Score</h2>', unsafe_allow_html=True)
401
  st.markdown(f'<div style="max-height: 150px; overflow-y: auto; background-color:#f0f0f0; padding:10px; border-radius:10px;">{score}</div>', unsafe_allow_html=True)
402
 
403
  # Hallucinated Section
404
- st.markdown('<h2 style="color:#100170;font-size:24px">Hallucinated?</h2>', unsafe_allow_html=True)
405
  st.markdown(f'<div style="max-height: 150px; overflow-y: auto; background-color:#f0f0f0; padding:10px; border-radius:10px;">{hallucination_score}</div>', unsafe_allow_html=True)
406
 
407
  # Clean and Scrollable Context Section
408
  cleaned_context = "\n".join(line.strip() for line in context.splitlines() if line.strip())
409
- st.markdown('<h2 style="color:#100170;font-size:24px">Context</h2>', unsafe_allow_html=True)
410
  st.markdown(f'<div style="max-height: 300px; overflow-y: auto; background-color:#f0f0f0; padding:10px; border-radius:10px;">{cleaned_context}</div>', unsafe_allow_html=True)
411
 
412
 
413
  # Augmented Knowledge Metadata Section
414
- metadata_header = '<h2 style="color:#100170;font-size:24px">Augmented Knowledge Metadata</h2>'
415
  metadata_container = '<div style="max-height: 300px; overflow-y: auto; background-color:#f0f0f0; padding:10px; border-radius:10px;">{}</div>'
416
  metadata_list = [doc.metadata for doc in response["source_documents"]]
417
  formatted_metadata_list = []
 
397
  else:
398
  score = "Evaluation is Turned OFF"
399
  # Confidence Score Section
400
+ st.markdown('<h2 style="color:#100170;font-size:18px">Confidence Score</h2>', unsafe_allow_html=True)
401
  st.markdown(f'<div style="max-height: 150px; overflow-y: auto; background-color:#f0f0f0; padding:10px; border-radius:10px;">{score}</div>', unsafe_allow_html=True)
402
 
403
  # Hallucinated Section
404
+ st.markdown('<h2 style="color:#100170;font-size:18px">Hallucinated?</h2>', unsafe_allow_html=True)
405
  st.markdown(f'<div style="max-height: 150px; overflow-y: auto; background-color:#f0f0f0; padding:10px; border-radius:10px;">{hallucination_score}</div>', unsafe_allow_html=True)
406
 
407
  # Clean and Scrollable Context Section
408
  cleaned_context = "\n".join(line.strip() for line in context.splitlines() if line.strip())
409
+ st.markdown('<h2 style="color:#100170;font-size:18px">Context</h2>', unsafe_allow_html=True)
410
  st.markdown(f'<div style="max-height: 300px; overflow-y: auto; background-color:#f0f0f0; padding:10px; border-radius:10px;">{cleaned_context}</div>', unsafe_allow_html=True)
411
 
412
 
413
  # Augmented Knowledge Metadata Section
414
+ metadata_header = '<h2 style="color:#100170;font-size:18px">Augmented Knowledge Metadata</h2>'
415
  metadata_container = '<div style="max-height: 300px; overflow-y: auto; background-color:#f0f0f0; padding:10px; border-radius:10px;">{}</div>'
416
  metadata_list = [doc.metadata for doc in response["source_documents"]]
417
  formatted_metadata_list = []