Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 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")
|
|
@@ -21,7 +22,6 @@ data_files = {
|
|
| 21 |
csv_datasets_reloaded = load_dataset("csv", data_files=data_files)
|
| 22 |
csv_datasets_reloaded
|
| 23 |
|
| 24 |
-
|
| 25 |
# prove we can save in JSON
|
| 26 |
for split, dataset in raw_datasets.items():
|
| 27 |
dataset.to_json(f"my-dataset-{split}.jsonl")
|
|
@@ -45,11 +45,12 @@ parquet_datasets_reloaded = load_dataset("parquet", data_files=parquet_data_file
|
|
| 45 |
parquet_datasets_reloaded
|
| 46 |
|
| 47 |
|
| 48 |
-
|
| 49 |
# prove we can save and load public local dataset on huggingface spaces
|
| 50 |
raw_datasets.save_to_disk("awacke1/my-arrow-datasets")
|
| 51 |
arrow_datasets_reloaded = load_from_disk("awacke1/my-arrow-datasets")
|
| 52 |
-
|
|
|
|
|
|
|
| 53 |
|
| 54 |
#awacke1_public_datasets = load_dataset("awacke1/my-arrow-datasets")
|
| 55 |
#awacke1_public_datasets
|
|
|
|
| 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")
|
|
|
|
| 22 |
csv_datasets_reloaded = load_dataset("csv", data_files=data_files)
|
| 23 |
csv_datasets_reloaded
|
| 24 |
|
|
|
|
| 25 |
# prove we can save in JSON
|
| 26 |
for split, dataset in raw_datasets.items():
|
| 27 |
dataset.to_json(f"my-dataset-{split}.jsonl")
|
|
|
|
| 45 |
parquet_datasets_reloaded
|
| 46 |
|
| 47 |
|
|
|
|
| 48 |
# prove we can save and load public local dataset on huggingface spaces
|
| 49 |
raw_datasets.save_to_disk("awacke1/my-arrow-datasets")
|
| 50 |
arrow_datasets_reloaded = load_from_disk("awacke1/my-arrow-datasets")
|
| 51 |
+
thisworked="Yes really worked"
|
| 52 |
+
arrow_datasets_reloaded
|
| 53 |
+
thisworked
|
| 54 |
|
| 55 |
#awacke1_public_datasets = load_dataset("awacke1/my-arrow-datasets")
|
| 56 |
#awacke1_public_datasets
|