AML / app.py
adollbo's picture
added application file
a086192
raw
history blame
959 Bytes
import streamlit as st
import pandas as pd
# Mocking the lists
positive_texts = ["Text A", "Text B", "Text C"]
positive_values = [0.8365079365079348, 0.12222222222222279, 0.04603174603174587]
negative_texts = ["Text X", "Text Y", "Text Z"]
negative_values = [-0.12063492063492065, -0.16349206349206302, -0.053968253968253166]
# Create a Streamlit app
st.title('Important Variables Analysis')
# Create a function to generate a table
def create_table(texts, values, title):
df = pd.DataFrame({"Feature Explanation": texts, 'Value': values})
st.markdown(f'### {title}') # Markdown for styling
st.table(df) # Display a simple table
# Arrange tables horizontally using Streamlit columns
col1, col2 = st.columns(2)
# Display tables in Streamlit columns
with col1:
create_table(positive_texts, positive_values, 'Important Suspicious Variables')
with col2:
create_table(negative_texts, negative_values, 'Important Unsuspicious Variables')