Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,9 @@ from datasets import load_dataset
|
|
2 |
import streamlit as st
|
3 |
import pandas as pd
|
4 |
|
|
|
|
|
|
|
5 |
# Load your dataset (replace 'your-dataset' with the actual dataset name)
|
6 |
csv_url = 'https://huggingface.co/datasets/NENS/wim_data/resolve/main/input_employees/boran.csv'
|
7 |
|
@@ -16,6 +19,10 @@ button = st.button('do it')
|
|
16 |
if button:
|
17 |
|
18 |
st.write(df)
|
|
|
|
|
|
|
|
|
19 |
|
20 |
-
df.to_csv("hf://spaces/NENS/test/test.csv")
|
21 |
print('het werkt!')
|
|
|
2 |
import streamlit as st
|
3 |
import pandas as pd
|
4 |
|
5 |
+
from huggingface_hub import HfFileSystem
|
6 |
+
fs = HfFileSystem()
|
7 |
+
|
8 |
# Load your dataset (replace 'your-dataset' with the actual dataset name)
|
9 |
csv_url = 'https://huggingface.co/datasets/NENS/wim_data/resolve/main/input_employees/boran.csv'
|
10 |
|
|
|
19 |
if button:
|
20 |
|
21 |
st.write(df)
|
22 |
+
|
23 |
+
with fs.open("spaces/NENS/test/test.csv", "w") as f:
|
24 |
+
f.write("text,label")
|
25 |
+
f.write("Fantastic movie!,good")
|
26 |
|
27 |
+
#df.to_csv("hf://spaces/NENS/test/test.csv")
|
28 |
print('het werkt!')
|