laituan245
commited on
Commit
•
4477196
1
Parent(s):
8c83639
Update README.md
Browse files
README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
|
|
|
5 |
```python
|
6 |
from transformers import AutoTokenizer, T5ForConditionalGeneration
|
7 |
|
@@ -15,4 +16,12 @@ input_text = 'CC1=CC=CC=<extra_id_0>'
|
|
15 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
16 |
outputs = model.generate(input_ids, num_beams=5, max_length=512)
|
17 |
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
|
18 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
|
5 |
+
## Example Usage
|
6 |
```python
|
7 |
from transformers import AutoTokenizer, T5ForConditionalGeneration
|
8 |
|
|
|
16 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
17 |
outputs = model.generate(input_ids, num_beams=5, max_length=512)
|
18 |
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
|
19 |
+
```
|
20 |
+
|
21 |
+
## Paper
|
22 |
+
|
23 |
+
For more information, please take a look at our paper.
|
24 |
+
|
25 |
+
Paper: [Translation between Molecules and Natural Language](https://arxiv.org/abs/2204.11817)
|
26 |
+
|
27 |
+
Authors: *Carl Edwards\*, Tuan Lai\*, Kevin Ros, Garrett Honke, Heng Ji*
|