Downloads · 30 days
696
1% of all-time downloads
laituan245/molt5-base-smiles2caption
molt5-base-smiles2caption is a machine learning model from laituan245. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This model can be used to generate an input caption from a SMILES string.
Downloads · 30 days
696
1% of all-time downloads
All-time downloads
120K
Public
Repo size
2 GB
Likes
3
Public
Click a slice to open those files.
.bin990 MB · 100%
From the Hugging Face model README
This model can be used to generate an input caption from a SMILES string.
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("laituan245/molt5-base-smiles2caption", model_max_length=512)
model = T5ForConditionalGeneration.from_pretrained('laituan245/molt5-base-smiles2caption')
input_text = 'C1=CC2=C(C(=C1)[O-])NC(=CC2=O)C(=O)O'
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
outputs = model.generate(input_ids, num_beams=5, max_length=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
For more information, please take a look at our paper.
Paper: Translation between Molecules and Natural Language
Authors: Carl Edwards*, Tuan Lai*, Kevin Ros, Garrett Honke, Heng Ji