Spaces:
Sleeping
Sleeping
File size: 898 Bytes
806e7f1 7c9a852 806e7f1 e897bdc 6072deb 806e7f1 7c9a852 806e7f1 7c9a852 806e7f1 e897bdc 806e7f1 e897bdc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | import streamlit as st
import pandas as pd
import ydata_profiling
from streamlit_pandas_profiling import st_profile_report
# Judul Aplikasi
st.set_page_config(page_title='Data Profiling', layout='wide')
st.title('๐ Data Profiling Dashboard')
# Upload File
uploaded_file = st.file_uploader("Upload dataset (CSV)", type=['csv'])
@st.cache_data
def load_data(file):
return pd.read_csv(file)
if uploaded_file is not None:
df = load_data(uploaded_file)
st.success("Dataset berhasil diunggah!")
# Profiling Data
st.subheader("๐ Profiling Data")
profile = df.profile_report()
st_profile_report(profile)
else:
st.info("Silakan unggah file CSV untuk mulai menganalisis data.")
# Tambahkan file requirements.txt untuk deploy di Hugging Face
with open("requirements.txt", "w") as f:
f.write("streamlit\npandas\nydata-profiling\nstreamlit-pandas-profiling")
|