awacke1 commited on
Commit
52c9a65
·
1 Parent(s): 4b1e0ae

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -0
app.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import plotly.express as px
4
+ import pandas_profiling
5
+
6
+ @st.cache
7
+ def load_data(file):
8
+ return pd.read_csv(file)
9
+
10
+ def main():
11
+ st.set_page_config(page_title="AutoML", page_icon=":robot:", layout="wide")
12
+ st.title("AutoML Streamlit Application")
13
+ file = st.file_uploader("Upload your CSV file", type=["csv"])
14
+ if file is not None:
15
+ df = load_data(file)
16
+ st.dataframe(df.head(10))
17
+ st.write("Statistics:")
18
+ st.write(df.describe())
19
+ st.write("Data Distribution:")
20
+ st.write(df.hist())
21
+ st.write("Pandas Profiling:")
22
+ profile = df.profile_report(title="Pandas Profiling Report")
23
+ st.write(profile)
24
+ st.write("Pandas Profiling (Sunburst Chart):")
25
+ sunburst = profile.get_final_html()
26
+ st.write(sunburst, unsafe_allow_html=True)
27
+ st.write("Filter by Column:")
28
+ column = st.selectbox("Select Column", df.columns)
29
+ filtered = df.sort_values(by=column)
30
+ st.write(filtered)
31
+
32
+ if __name__ == '__main__':
33
+ main()