File size: 876 Bytes
67f9cb6
 
6b19742
67f9cb6
d335e10
 
 
67f9cb6
754575e
67f9cb6
4c181bb
67f9cb6
 
 
0b4e8d6
 
1ddbfdc
 
 
 
d233f85
67f9cb6
d233f85
 
 
d335e10
b1a1c23
d335e10
 
9ac4415
 
d233f85
d335e10
d233f85
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
32
33
34
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!')