Datasets:
Delete
Browse files- stargate_dataset.py +0 -39
stargate_dataset.py
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
from datasets import Dataset
|
| 2 |
-
import json
|
| 3 |
-
|
| 4 |
-
# Load or define your metadata
|
| 5 |
-
sample_data = [
|
| 6 |
-
{
|
| 7 |
-
"filename": "CIA-RDP79-00999A000200010002-3.pdf",
|
| 8 |
-
"document_id": "CIA-RDP79-00999A000200010002-3",
|
| 9 |
-
"page_count": 10,
|
| 10 |
-
"image_count": 10,
|
| 11 |
-
"processed_at": "2025-03-22T22:04:19.172208",
|
| 12 |
-
"ocr_status": "pending",
|
| 13 |
-
"text_extracted": False,
|
| 14 |
-
"source": "CIA Stargate Archive",
|
| 15 |
-
"tags": [],
|
| 16 |
-
"pdf": None # Add actual file path or binary later
|
| 17 |
-
},
|
| 18 |
-
{
|
| 19 |
-
"filename": "CIA-RDP96-00788R000700020002-2.pdf",
|
| 20 |
-
"document_id": "CIA-RDP96-00788R000700020002-2",
|
| 21 |
-
"page_count": 14,
|
| 22 |
-
"image_count": 14,
|
| 23 |
-
"processed_at": "2025-03-22T22:10:03.984102",
|
| 24 |
-
"ocr_status": "pending",
|
| 25 |
-
"text_extracted": False,
|
| 26 |
-
"source": "CIA Stargate Archive",
|
| 27 |
-
"tags": ["remote_viewing", "tasking_response"],
|
| 28 |
-
"pdf": None
|
| 29 |
-
}
|
| 30 |
-
]
|
| 31 |
-
|
| 32 |
-
# Create the dataset
|
| 33 |
-
dataset = Dataset.from_list(sample_data)
|
| 34 |
-
|
| 35 |
-
# Save it locally as a Hugging Face Arrow dataset
|
| 36 |
-
dataset.save_to_disk("stargate_raw_pdfs")
|
| 37 |
-
|
| 38 |
-
# (Optional) Preview
|
| 39 |
-
print(dataset)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|