PyTorch
bert
mrdupont commited on
Commit
2171313
·
verified ·
1 Parent(s): 4871290

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -2
README.md CHANGED
@@ -5,9 +5,22 @@ This repository contains the model weights of the BERT model trained by predicti
5
  Further information can be found in our [publication](https://arxiv.org/abs/2503.03360).
6
 
7
  ```python
8
- from transformers import AutoModel
9
 
10
- AutoModel.from_pretrained("UdS-LSV/da4mt-mtr-30")
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ```
12
 
13
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/680a578d0009ac929a7389a9/IRWDB3ysTMsekhoxnB6AK.png)
 
5
  Further information can be found in our [publication](https://arxiv.org/abs/2503.03360).
6
 
7
  ```python
8
+ from transformers import AutoModel, AutoTokenizer
9
 
10
+ mols = [
11
+ "CCOc1cc2nn(CCC(C)(C)O)cc2cc1NC(=O)c1cccc(C(F)F)n1",
12
+ "CN(c1ncc(F)cn1)[C@H]1CCCNC1",
13
+ "CC(C)(Oc1ccc(-c2cnc(N)c(-c3ccc(Cl)cc3)c2)cc1)C(=O)O",
14
+ "CC(C)(O)CCn1cc2cc(NC(=O)c3cccc(C(F)(F)F)n3)c(C(C)(C)O)cc2n1",
15
+ # ...
16
+ ]
17
+
18
+
19
+ tokenizer = AutoTokenizer.from_pretrained("UdS-LSV/da4mt-mtr-60")
20
+ model = AutoModel.from_pretrained("UdS-LSV/da4mt-mtr-60")
21
+
22
+ inputs = tokenizer(mols, add_special_tokens=True, truncation=True, max_length=128, padding="max_length", return_tensors="pt")
23
+ embeddings = model(**inputs).last_hidden_state[:, 0, :]
24
  ```
25
 
26
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/680a578d0009ac929a7389a9/IRWDB3ysTMsekhoxnB6AK.png)