Spaces:
Sleeping
Sleeping
import streamlit as st | |
from utils import display_graph | |
st.set_page_config(layout="wide") | |
st.title("Graph Correlation") | |
col1, col2, col3 = st.columns((1,1,1)) | |
with st.sidebar: | |
csv = st.file_uploader(label='CSV file to analyse') | |
csv = st.selectbox(label=' Or Choose a Default Dataset', options=['heart.csv', 'flights.csv', 'titanic_cleaned.csv', 'pokemon_cleaned.csv']) | |
corr_type = st.selectbox(label='Correlation Type', options=['kendall', 'pearson', 'spearman']) | |
th = st.slider(label='Correlation Threshold', min_value=0., max_value=1., value=0.15, step=0.01) | |
but = st.button("Show Correlation Graph",) | |
if but == False: | |
graph_html = display_graph(csv_file='heart.csv', threshold=0.15, corr_type='kendall') | |
st.components.v1.html(graph_html, width=None, height=2000) | |
if but == True: | |
graph_html = display_graph(csv_file=csv, threshold=th, corr_type=corr_type) | |
st.components.v1.html(graph_html, width=None, height=2000) | |