Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -20,48 +20,21 @@ This repository contains preprocessed datasets from the LeMat-Bulk dataset prepa
|
|
| 20 |
|
| 21 |
---
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
-
Since this repository is
|
| 26 |
-
|
| 27 |
-
### Step 1: Set the HF_TOKEN environment variable
|
| 28 |
-
Before loading the dataset, make sure to set the `HF_TOKEN` environment variable in your terminal/environment:
|
| 29 |
-
|
| 30 |
-
**On Linux/macOS:**
|
| 31 |
-
```bash
|
| 32 |
-
export HF_TOKEN="your_huggingface_read_token"
|
| 33 |
-
```
|
| 34 |
-
|
| 35 |
-
**On Windows (PowerShell):**
|
| 36 |
-
```powershell
|
| 37 |
-
$env:HF_TOKEN="your_huggingface_read_token"
|
| 38 |
-
```
|
| 39 |
-
|
| 40 |
-
**On Windows (CMD):**
|
| 41 |
-
```cmd
|
| 42 |
-
set HF_TOKEN=your_huggingface_read_token
|
| 43 |
-
```
|
| 44 |
-
|
| 45 |
-
### Step 2: Load the Dataset in Python
|
| 46 |
-
Once the environment variable is set, you can load the dataset subsets directly. The `datasets` library will automatically pick up the `HF_TOKEN` environment variable.
|
| 47 |
|
| 48 |
```python
|
| 49 |
-
import os
|
| 50 |
from datasets import load_dataset
|
| 51 |
|
| 52 |
-
#
|
| 53 |
-
|
| 54 |
-
```
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
from datasets import load_dataset
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
name="default",
|
| 63 |
-
token="your_huggingface_read_token"
|
| 64 |
-
)
|
| 65 |
```
|
| 66 |
|
| 67 |
---
|
|
|
|
| 20 |
|
| 21 |
---
|
| 22 |
|
| 23 |
+
## 🚀 Loading the Dataset
|
| 24 |
|
| 25 |
+
Since this repository is public, you can load the dataset subsets directly without authentication using the Hugging Face `datasets` library:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
```python
|
|
|
|
| 28 |
from datasets import load_dataset
|
| 29 |
|
| 30 |
+
# Load Default (Dataset A)
|
| 31 |
+
dataset_a = load_dataset("youssefsassi/Le-Mat-Bulk_matgen_constrained", name="default")
|
|
|
|
| 32 |
|
| 33 |
+
# Load No Lanthanoids
|
| 34 |
+
dataset_no_lan = load_dataset("youssefsassi/Le-Mat-Bulk_matgen_constrained", name="no_lanthanoids")
|
|
|
|
| 35 |
|
| 36 |
+
# Load Extension (Dataset B)
|
| 37 |
+
dataset_b = load_dataset("youssefsassi/Le-Mat-Bulk_matgen_constrained", name="extension")
|
|
|
|
|
|
|
|
|
|
| 38 |
```
|
| 39 |
|
| 40 |
---
|