import modules import pandas as pd import streamlit as st st.markdown( """ # 2hack2furious anonymiser upload a dataset and get a cleaned dataset back. """ ) uploaded_file = st.file_uploader(f"Upload dataset:", type=modules.SUPPORTED_TYPES) df, (filename, extension), result = modules.load_file(uploaded_file) st.text(result) if df is not None: st.title("Before:") st.dataframe(df) drop_missing = st.checkbox("Drop Missing", True) remove_duplicates = st.checkbox("Remove Duplicates", True) st.title("After:") df = modules.data_cleaner(df, drop_missing, remove_duplicates) st.dataframe(df) download_file = modules.create_file(df, extension) st.download_button("Download cleaned data", download_file, file_name=filename) st.markdown("---") st.text("Created by team #2hack2furious for the hackthethreat2023")