adollbo commited on
Commit
a086192
·
1 Parent(s): 1d85819

added application file

Browse files
Files changed (1) hide show
  1. app.py +28 -0
app.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+
4
+ # Mocking the lists
5
+ positive_texts = ["Text A", "Text B", "Text C"]
6
+ positive_values = [0.8365079365079348, 0.12222222222222279, 0.04603174603174587]
7
+
8
+ negative_texts = ["Text X", "Text Y", "Text Z"]
9
+ negative_values = [-0.12063492063492065, -0.16349206349206302, -0.053968253968253166]
10
+
11
+ # Create a Streamlit app
12
+ st.title('Important Variables Analysis')
13
+
14
+ # Create a function to generate a table
15
+ def create_table(texts, values, title):
16
+ df = pd.DataFrame({"Feature Explanation": texts, 'Value': values})
17
+ st.markdown(f'### {title}') # Markdown for styling
18
+ st.table(df) # Display a simple table
19
+
20
+ # Arrange tables horizontally using Streamlit columns
21
+ col1, col2 = st.columns(2)
22
+
23
+ # Display tables in Streamlit columns
24
+ with col1:
25
+ create_table(positive_texts, positive_values, 'Important Suspicious Variables')
26
+
27
+ with col2:
28
+ create_table(negative_texts, negative_values, 'Important Unsuspicious Variables')