from datasets import load_dataset import streamlit as st import pandas as pd from huggingface_hub import HfFileSystem fs = HfFileSystem() # Load your dataset (replace 'your-dataset' with the actual dataset name) csv_url = 'https://huggingface.co/datasets/NENS/wim_data/resolve/main/input_employees/boran.csv' df = pd.read_csv('esther.csv') st.write(df) df.loc[df['week'] == 42, 'druk'] = 'heel druk' hoi= fs.ls("datasets/NENS/wim_data/input_employees/", detail=False) st.write(hoi) button = st.button('do it') if button: st.write(df) with fs.open("datasets/NENS/wim_data/input_employees/test.csv", "w") as f: f.write("text,label") f.write("Fantastic movie!,good") #https://huggingface.co/datasets/NENS/wim_data/resolve/main/input_employees/esther.csv #df.to_csv("hf://spaces/NENS/test/test.csv") print('het werkt!')