Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,24 +2,11 @@
|
|
| 2 |
from datasets import load_dataset
|
| 3 |
raw_datasets = load_dataset("allocine")
|
| 4 |
raw_datasets.save_to_disk("my-arrow-datasets")
|
| 5 |
-
|
| 6 |
# load dataset from disk - prove we can reload it
|
| 7 |
from datasets import load_from_disk
|
| 8 |
arrow_datasets_reloaded = load_from_disk("my-arrow-datasets")
|
| 9 |
arrow_datasets_reloaded
|
| 10 |
|
| 11 |
-
# prove we can save and load public local dataset on huggingface spaces
|
| 12 |
-
raw_datasets.save_to_disk("awacke1/my-arrow-datasets")
|
| 13 |
-
arrow_datasets_reloaded = load_from_disk("awacke1/my-arrow-datasets")
|
| 14 |
-
awacke1_public_datasets = load_dataset("awacke1/my-arrow-datasets")
|
| 15 |
-
awacke1_public_datasets
|
| 16 |
-
|
| 17 |
-
#raw_datasets = load_dataset("my-arrow-datasets")
|
| 18 |
-
#raw_datasets.cache_files
|
| 19 |
-
|
| 20 |
-
#from datasets import load_dataset
|
| 21 |
-
#dataset = load_dataset("awacke1/my-arrow-datasets")
|
| 22 |
-
|
| 23 |
# prove we can save in CSV
|
| 24 |
for split, dataset in raw_datasets.items():
|
| 25 |
dataset.to_csv(f"my-dataset-{split}.csv", index=None)
|
|
@@ -52,4 +39,13 @@ parquet_data_files = {
|
|
| 52 |
"test": "my-dataset-test.parquet",
|
| 53 |
}
|
| 54 |
parquet_datasets_reloaded = load_dataset("parquet", data_files=parquet_data_files)
|
| 55 |
-
parquet_datasets_reloaded
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
from datasets import load_dataset
|
| 3 |
raw_datasets = load_dataset("allocine")
|
| 4 |
raw_datasets.save_to_disk("my-arrow-datasets")
|
|
|
|
| 5 |
# load dataset from disk - prove we can reload it
|
| 6 |
from datasets import load_from_disk
|
| 7 |
arrow_datasets_reloaded = load_from_disk("my-arrow-datasets")
|
| 8 |
arrow_datasets_reloaded
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# prove we can save in CSV
|
| 11 |
for split, dataset in raw_datasets.items():
|
| 12 |
dataset.to_csv(f"my-dataset-{split}.csv", index=None)
|
|
|
|
| 39 |
"test": "my-dataset-test.parquet",
|
| 40 |
}
|
| 41 |
parquet_datasets_reloaded = load_dataset("parquet", data_files=parquet_data_files)
|
| 42 |
+
parquet_datasets_reloaded
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
# prove we can save and load public local dataset on huggingface spaces
|
| 47 |
+
raw_datasets.save_to_disk("awacke1/my-arrow-datasets")
|
| 48 |
+
arrow_datasets_reloaded = load_from_disk("awacke1/my-arrow-datasets")
|
| 49 |
+
awacke1_public_datasets = load_dataset("awacke1/my-arrow-datasets")
|
| 50 |
+
awacke1_public_datasets
|
| 51 |
+
|