kyamagu hwaseem04 commited on
Commit
72fa09a
1 Parent(s): c3d1fb8

Update README.md (#4)

Browse files

- Update README.md (5f8c21093ebabe0c1069e6b8f434b6ad1bdc28ee)


Co-authored-by: Muhammad Waseem <hwaseem04@users.noreply.huggingface.co>

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