import modules import streamlit as st # Sidebar st.sidebar.header("2hack2furious anonymiser") uploaded_file = st.sidebar.file_uploader(f"Upload dataset:", type=modules.SUPPORTED_TYPES) st.sidebar.markdown("---") st.sidebar.text("Data cleaning options:") drop_missing = st.sidebar.checkbox("Drop Missing", True) remove_duplicates = st.sidebar.checkbox("Remove Duplicates", True) st.sidebar.markdown("---") st.sidebar.text("Data anonymizing options:") st.sidebar.markdown("---") st.sidebar.markdown( """ Disclaimer: *Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam urna sem, bibendum efficitur pellentesque a, sollicitudin pharetra urna. Nam vel lectus vitae elit luctus feugiat a a purus. Aenean mollis quis ipsum sed ornare. Nunc sit amet ultricies tellus. Vivamus vulputate sem id molestie viverra. Etiam egestas lobortis enim, sit amet lobortis ligula sollicitudin vel. Nunc eget ipsum sollicitudin, convallis.* Created by team #2hack2furious for the hackthethreat2023 """ ) # Main df, (filename, extension), result = modules.load_file(uploaded_file) st.text(result) if df is not None: st.title("Before:") st.dataframe(df) 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)