prithivMLmods commited on
Commit
c03d88e
·
verified ·
1 Parent(s): b5761b9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -1
README.md CHANGED
@@ -2,4 +2,21 @@
2
  license: apache-2.0
3
  datasets:
4
  - flwrlabs/pacs
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
3
  datasets:
4
  - flwrlabs/pacs
5
+ ---
6
+
7
+
8
+ ```py
9
+ from datasets import load_dataset
10
+
11
+ # Load the dataset
12
+ dataset = load_dataset("flwrlabs/pacs")
13
+
14
+ # Extract unique masterCategory values (assuming it's a string field)
15
+ labels = sorted(set(example["domain"] for example in dataset["train"]))
16
+
17
+ # Create id2label mapping
18
+ id2label = {str(i): label for i, label in enumerate(labels)}
19
+
20
+ # Print the mapping
21
+ print(id2label)
22
+ ```