lhallee commited on
Commit
3e4de1b
·
verified ·
1 Parent(s): 956aaaf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -0
README.md CHANGED
@@ -19,4 +19,27 @@ configs:
19
  ---
20
  10 million random examples from Uniref50 representative sequences (October 2023) and computed [selfies](https://github.com/aspuru-guzik-group/selfies) strings. The strings are stored as input ids from a custom selfies tokenizer. A BERT tokenizer with this vocabulary has been uploaded to this dataset under the files.
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  Intended for atom-wise protein language modeling.
 
19
  ---
20
  10 million random examples from Uniref50 representative sequences (October 2023) and computed [selfies](https://github.com/aspuru-guzik-group/selfies) strings. The strings are stored as input ids from a custom selfies tokenizer. A BERT tokenizer with this vocabulary has been uploaded to this dataset under the files.
21
 
22
+ You can access the tokenizer like this:
23
+
24
+ ```python
25
+ import os
26
+ from huggingface_hub import hf_hub_download
27
+ from transformers import AutoTokenizer
28
+
29
+ repo_path = 'Synthyra/ProteinSelfies'
30
+ local_path = 'ProteinSelfies'
31
+ files = ['special_tokens_map.json', 'tokenizer_config.json', 'vocab.txt']
32
+ os.makedirs(local_path, exist_ok=True)
33
+
34
+ for file in files:
35
+ hf_hub_download(
36
+ repo_id=repo_path,
37
+ filename=file,
38
+ repo_type='dataset',
39
+ local_dir=local_path
40
+ )
41
+
42
+ tokenizer = AutoTokenizer.from_pretrained(local_path)
43
+ ```
44
+
45
  Intended for atom-wise protein language modeling.