hwaseem04 commited on
Commit
5f8c210
1 Parent(s): c3d1fb8

Update README.md

Browse files

Changed the snippet to load the correct data split.

Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -777,10 +777,11 @@ Each instance has scalar attributes (canvas) and sequence attributes (elements).
777
  To get a label for categorical values, use the `int2str` method:
778
 
779
  ```python
 
780
  key = "font"
781
- example = dataset[0]
782
 
783
- dataset.features[key].int2str(example[key])
784
  ```
785
 
786
  ### Data Fields
 
777
  To get a label for categorical values, use the `int2str` method:
778
 
779
  ```python
780
+ data = dataset['train'] # obtain the train set
781
  key = "font"
782
+ example = data[0] # obtain first sample in train set
783
 
784
+ data.features[key].feature.int2str(example[key]) # obtain the text equivalent of the encoded values
785
  ```
786
 
787
  ### Data Fields