File size: 629 Bytes
c8fb072
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import streamlit as st
import pandas as pd

def display_qa_results(self,response):

    # Display summary
    st.subheader("🧪 Test Summary")
    st.write(response['summary'])

    # Display the table in markdown
    st.subheader("📋 Test Table")
    st.markdown(response['table'], unsafe_allow_html=True)

    # Optionally show detailed error info (if any)
    st.subheader("⚠️ Detailed Errors")
    errors = [item for item in response['details'] if item.get("Status") == "❌ Fail"]
    if errors:
        df_errors = pd.DataFrame(errors)
        st.dataframe(df_errors)
    else:
        st.success("No errors found!")